diff --git a/Assets/Prefab/StopWatch.prefab b/Assets/Prefab/StopWatch.prefab new file mode 100644 index 0000000..b203146 --- /dev/null +++ b/Assets/Prefab/StopWatch.prefab @@ -0,0 +1,152 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &4540168813500152250 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4540168813500152252} + - component: {fileID: 4540168813500152251} + m_Layer: 0 + m_Name: StopWatch + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4540168813500152252 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4540168813500152250} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -8, y: 4.5, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4540168814355505025} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &4540168813500152251 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4540168813500152250} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a5c5c0afd2e0d464e8ae37a0421da29c, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &4540168814355505024 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4540168814355505025} + - component: {fileID: 4540168814355505028} + - component: {fileID: 4540168814355505027} + - component: {fileID: 4540168814355505026} + m_Layer: 0 + m_Name: StringDisplay + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4540168814355505025 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4540168814355505024} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 4540168813500152252} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &4540168814355505028 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4540168814355505024} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: bacbf1a90b8e34ca9a11eef6ce0e0aec, type: 3} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!102 &4540168814355505027 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4540168814355505024} + m_Text: 00:00.000 + m_OffsetZ: 0 + m_CharacterSize: 0.1 + m_LineSpacing: 0 + m_Anchor: 0 + m_Alignment: 1 + m_TabSize: 4 + m_FontSize: 64 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 12800000, guid: bacbf1a90b8e34ca9a11eef6ce0e0aec, type: 3} + m_Color: + serializedVersion: 2 + rgba: 4294967295 +--- !u!114 &4540168814355505026 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4540168814355505024} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f7bc6e37794aa465fa10fdd5c28ef163, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/Prefab/StopWatch.prefab.meta b/Assets/Prefab/StopWatch.prefab.meta new file mode 100644 index 0000000..760e059 --- /dev/null +++ b/Assets/Prefab/StopWatch.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c064dac822aa943a09076c1d6326f67c +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Ending.unity b/Assets/Scenes/Ending.unity index 82c0c46..3e661d7 100644 --- a/Assets/Scenes/Ending.unity +++ b/Assets/Scenes/Ending.unity @@ -430,6 +430,75 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1107416876} m_CullTransparentMesh: 0 +--- !u!1001 &1471671508 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4540168813500152250, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_Name + value: StopWatch + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_RootOrder + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.x + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.y + value: 4.5 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c064dac822aa943a09076c1d6326f67c, type: 3} --- !u!1001 &1531767628 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/Stage1.unity b/Assets/Scenes/Stage1.unity index 886ed1c..69479e0 100644 --- a/Assets/Scenes/Stage1.unity +++ b/Assets/Scenes/Stage1.unity @@ -1356,6 +1356,75 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: dd5c8a008c07646bda176806d409ce5b, type: 3} +--- !u!1001 &735744451 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4540168813500152250, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_Name + value: StopWatch + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_RootOrder + value: 12 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.x + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.y + value: 4.5 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c064dac822aa943a09076c1d6326f67c, type: 3} --- !u!1001 &1182409925 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/Stage2.unity b/Assets/Scenes/Stage2.unity index 061c51f..f0e05a6 100644 --- a/Assets/Scenes/Stage2.unity +++ b/Assets/Scenes/Stage2.unity @@ -1505,6 +1505,75 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 4d390c272771248269d4547098b353be, type: 3} +--- !u!1001 &1725919178 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4540168813500152250, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_Name + value: StopWatch + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_RootOrder + value: 13 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.x + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.y + value: 4.5 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c064dac822aa943a09076c1d6326f67c, type: 3} --- !u!1 &1760797111 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/Stage3.unity b/Assets/Scenes/Stage3.unity index 5a4a39c..c1b1c90 100644 --- a/Assets/Scenes/Stage3.unity +++ b/Assets/Scenes/Stage3.unity @@ -1227,6 +1227,75 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 7dbdfab613801468799f3d888f3b2768, type: 3} +--- !u!1001 &1599278731 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4540168813500152250, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_Name + value: StopWatch + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_RootOrder + value: 13 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.x + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.y + value: 4.5 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c064dac822aa943a09076c1d6326f67c, type: 3} --- !u!1 &1760797111 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/Stage4.unity b/Assets/Scenes/Stage4.unity index 431cd37..9fd521a 100644 --- a/Assets/Scenes/Stage4.unity +++ b/Assets/Scenes/Stage4.unity @@ -1677,6 +1677,75 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 3689f0bd3f440428faeaab1ca33c7187, type: 3} +--- !u!1001 &1659440262 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4540168813500152250, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_Name + value: StopWatch + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_RootOrder + value: 15 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.x + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.y + value: 4.5 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c064dac822aa943a09076c1d6326f67c, type: 3} --- !u!1001 &1726863258 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/Stage5.unity b/Assets/Scenes/Stage5.unity index 1da3938..7fcfead 100644 --- a/Assets/Scenes/Stage5.unity +++ b/Assets/Scenes/Stage5.unity @@ -2059,6 +2059,75 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &2036340925 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4540168813500152250, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_Name + value: StopWatch + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_RootOrder + value: 13 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.x + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.y + value: 4.5 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c064dac822aa943a09076c1d6326f67c, type: 3} --- !u!1001 &2115427471 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/Stage6.unity b/Assets/Scenes/Stage6.unity index b29eee9..7b1f78b 100644 --- a/Assets/Scenes/Stage6.unity +++ b/Assets/Scenes/Stage6.unity @@ -1627,6 +1627,75 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: d0d97b60f630744c8a7ecc5ac79b4d57, type: 3} +--- !u!1001 &1597388387 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4540168813500152250, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_Name + value: StopWatch + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_RootOrder + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.x + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.y + value: 4.5 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c064dac822aa943a09076c1d6326f67c, type: 3} --- !u!1001 &1758993066 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/Stage7.unity b/Assets/Scenes/Stage7.unity index f28853a..1205550 100644 --- a/Assets/Scenes/Stage7.unity +++ b/Assets/Scenes/Stage7.unity @@ -1710,6 +1710,75 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 4d390c272771248269d4547098b353be, type: 3} +--- !u!1001 &1837301773 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4540168813500152250, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_Name + value: StopWatch + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_RootOrder + value: 11 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.x + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.y + value: 4.5 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c064dac822aa943a09076c1d6326f67c, type: 3} --- !u!1001 &2115427471 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/TestIwamoto.unity b/Assets/Scenes/TestIwamoto.unity index 6f0b6b5..e811b25 100644 --- a/Assets/Scenes/TestIwamoto.unity +++ b/Assets/Scenes/TestIwamoto.unity @@ -1816,6 +1816,75 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 951b26fe6280a4ae3bf696f21b3f637b, type: 3} +--- !u!1001 &4540168813988970080 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4540168813500152250, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_Name + value: StopWatch + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_RootOrder + value: 16 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.x + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.y + value: 4.5 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c064dac822aa943a09076c1d6326f67c, type: 3} --- !u!1001 &7071123508626625102 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/Title.unity b/Assets/Scenes/Title.unity index 1036d18..4037bfd 100644 --- a/Assets/Scenes/Title.unity +++ b/Assets/Scenes/Title.unity @@ -941,6 +941,75 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 990477081} m_CullTransparentMesh: 0 +--- !u!1001 &1046584751 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4540168813500152250, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_Name + value: StopWatch + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_RootOrder + value: 17 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.x + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.y + value: 4.5 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c064dac822aa943a09076c1d6326f67c, type: 3} --- !u!1001 &1080266403 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/stage0.unity b/Assets/Scenes/stage0.unity index 76cb00a..36c1976 100644 --- a/Assets/Scenes/stage0.unity +++ b/Assets/Scenes/stage0.unity @@ -1095,6 +1095,75 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 3a2a36f83e2384928b17857317d5db9d, type: 3} +--- !u!1001 &1625642276 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4540168813500152250, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_Name + value: StopWatch + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_RootOrder + value: 15 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.x + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.y + value: 4.5 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c064dac822aa943a09076c1d6326f67c, type: 3} --- !u!1 &1655978055 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/stage8.unity b/Assets/Scenes/stage8.unity index 8f123d3..cfa1114 100644 --- a/Assets/Scenes/stage8.unity +++ b/Assets/Scenes/stage8.unity @@ -2048,6 +2048,75 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 9 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1821404954 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4540168813500152250, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_Name + value: StopWatch + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_RootOrder + value: 17 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.x + value: -8 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.y + value: 4.5 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4540168813500152252, guid: c064dac822aa943a09076c1d6326f67c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c064dac822aa943a09076c1d6326f67c, type: 3} --- !u!1001 &1988224135 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Endroll.cs b/Assets/Scripts/Endroll.cs index 6056ec5..e0186d6 100644 --- a/Assets/Scripts/Endroll.cs +++ b/Assets/Scripts/Endroll.cs @@ -2,6 +2,7 @@ using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; +using Utility; /// 実装:岩本 /// @@ -10,10 +11,12 @@ public class Endroll : MonoBehaviour { public GameObject Logo; + private System.Diagnostics.Stopwatch stopWatch; private Text tex; private float intervalSecond = 6.0f; + // private float blinkingSecond = .5f; private string[] creditArray = new string[] { "おわり", @@ -24,12 +27,16 @@ public class Endroll : MonoBehaviour "スタッフ\n< chouette >\nプログラミング\nステージ制作\nデバッグ", }; private string company = "九州工業大学\nプログラミング研究会"; + private string clearTimeText; private Vector3 logoPos = new Vector3(0.0f, 1.6f, 0.0f); void Start() { tex = GetComponent(); + stopWatch = GameObject.Find("StopWatch").GetComponent().stopWatch; + clearTimeText = "クリアタイム\n" + stopWatch.Elapsed.ToString(@"mm\:ss\.ff") + "\nCongratulation!!!"; + StartCoroutine(RunEndroll()); } @@ -45,9 +52,23 @@ IEnumerator RunEndroll() ChangeText(credit); yield return new WaitForSeconds(intervalSecond); } - Instantiate(Logo, logoPos, Quaternion.identity); + + Destroy(Instantiate(Logo, logoPos, Quaternion.identity), intervalSecond); ChangeText(company); - yield return new WaitForSeconds(intervalSecond * 3); - SceneManager.LoadScene((int)Utility.SceneIndex.Title); + yield return new WaitForSeconds(intervalSecond); + + // クリアタイムを点滅させる + // for (int i = 0; i < 8; i++) + // { + // ChangeText(clearTimeText); + // yield return new WaitForSeconds(blinkingSecond); + // ChangeText(""); + // yield return new WaitForSeconds(blinkingSecond); + // } + + ChangeText(clearTimeText); + yield return new WaitForSeconds(intervalSecond * 2); + + SceneManager.LoadScene((int)SceneIndex.Title); } } diff --git a/Assets/Scripts/StopWatch.cs b/Assets/Scripts/StopWatch.cs new file mode 100644 index 0000000..23ce0ff --- /dev/null +++ b/Assets/Scripts/StopWatch.cs @@ -0,0 +1,71 @@ +using System.Diagnostics; +using UnityEngine; +using UnityEngine.SceneManagement; +using Utility; + +/// +/// 経過時間を表示するタイマーを管理する +/// 複数シーンをまたぐためシングルトンを用いる +/// +public class StopWatch : MonoBehaviour +{ + static bool dontDestroyEnabled = false; + + public Stopwatch stopWatch = new Stopwatch(); + + StringDisplay stringDisplay; + + //シングルトン設定 + void Awake() + { + if (dontDestroyEnabled) + { + Destroy(gameObject); + } + dontDestroyEnabled = true; + DontDestroyOnLoad(this.gameObject); + } + + void Start() + { + stringDisplay = GetComponentInChildren(); + //シーンが切り替わった時に呼ばれるメソッドを登録 + SceneManager.activeSceneChanged += OnActiveSceneChanged; + } + + // シーンが切り替わった瞬間に呼ばれるメソッド  + // 切り替わった際にしか呼ばれないので注意 + void OnActiveSceneChanged(Scene prevScene, Scene nextScene) + { + ToggleCtrl(nextScene.buildIndex); + } + + void ToggleCtrl(int buildIndex) + { + switch ((SceneIndex)buildIndex) + { + case SceneIndex.Turtorial: + stopWatch.Start(); + break; + + case SceneIndex.Ending: + stopWatch.Stop(); + break; + + case SceneIndex.Title: + stopWatch.Reset(); + break; + + default: + // デバック向けにどのステージから始めてもタイマーを起動するように + stopWatch.Start(); + break; + } + } + + void Update() + { + // TODO: Update内で呼び出だすとボトルネックになる可能性があるので改善する + stringDisplay.DisplayString(stopWatch.Elapsed.ToString(@"mm\:ss\.ff")); + } +} diff --git a/Assets/Scripts/StopWatch.cs.meta b/Assets/Scripts/StopWatch.cs.meta new file mode 100644 index 0000000..fe5e8c4 --- /dev/null +++ b/Assets/Scripts/StopWatch.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a5c5c0afd2e0d464e8ae37a0421da29c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: