dev-hazim
Ali Sharoz 3 weeks ago
parent 3a8b15222f
commit 14afe08987

@ -12,9 +12,6 @@ AnimatorStateMachine:
- serializedVersion: 1 - serializedVersion: 1
m_State: {fileID: -3470866387478709306} m_State: {fileID: -3470866387478709306}
m_Position: {x: 290, y: 30, z: 0} m_Position: {x: 290, y: 30, z: 0}
- serializedVersion: 1
m_State: {fileID: 8052880333125191544}
m_Position: {x: 260, y: 100, z: 0}
m_ChildStateMachines: [] m_ChildStateMachines: []
m_AnyStateTransitions: [] m_AnyStateTransitions: []
m_EntryTransitions: [] m_EntryTransitions: []
@ -24,7 +21,7 @@ AnimatorStateMachine:
m_EntryPosition: {x: 50, y: 120, z: 0} m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0} m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 8052880333125191544} m_DefaultState: {fileID: -3470866387478709306}
--- !u!1102 &-3470866387478709306 --- !u!1102 &-3470866387478709306
AnimatorState: AnimatorState:
serializedVersion: 6 serializedVersion: 6
@ -79,55 +76,3 @@ AnimatorController:
m_IKPass: 0 m_IKPass: 0
m_SyncedLayerAffectsTiming: 0 m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000} m_Controller: {fileID: 9100000}
--- !u!1101 &7268997149197055408
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: Rotating
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -3470866387478709306}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 0
m_HasFixedDuration: 0
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &8052880333125191544
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Idle
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 7268997149197055408}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 692bfd275132b3140aa67ea7263618eb, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:

@ -146,6 +146,140 @@ MonoBehaviour:
m_LightCookieSize: {x: 1, y: 1} m_LightCookieSize: {x: 1, y: 1}
m_LightCookieOffset: {x: 0, y: 0} m_LightCookieOffset: {x: 0, y: 0}
m_SoftShadowQuality: 0 m_SoftShadowQuality: 0
--- !u!1 &107568633
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 107568634}
- component: {fileID: 107568636}
- component: {fileID: 107568635}
m_Layer: 5
m_Name: TimerText
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &107568634
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 107568633}
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 222782635}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 250}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &107568635
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 107568633}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 03:00
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 1a8c97d4cbe5134499b26527f8609c7e, type: 2}
m_sharedMaterial: {fileID: -466885322316925189, guid: 1a8c97d4cbe5134499b26527f8609c7e, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 72
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 16
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &107568636
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 107568633}
m_CullTransparentMesh: 1
--- !u!1001 &112525772 --- !u!1001 &112525772
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1246,6 +1380,12 @@ PrefabInstance:
- targetCorrespondingSourceObject: {fileID: 5277713031684110775, guid: 523332e67f2466e4f818161850bfb207, type: 3} - targetCorrespondingSourceObject: {fileID: 5277713031684110775, guid: 523332e67f2466e4f818161850bfb207, type: 3}
insertIndex: 5 insertIndex: 5
addedObject: {fileID: 4916910949679961597} addedObject: {fileID: 4916910949679961597}
- targetCorrespondingSourceObject: {fileID: 5277713031684110775, guid: 523332e67f2466e4f818161850bfb207, type: 3}
insertIndex: -1
addedObject: {fileID: 107568634}
- targetCorrespondingSourceObject: {fileID: 5277713031684110775, guid: 523332e67f2466e4f818161850bfb207, type: 3}
insertIndex: -1
addedObject: {fileID: 1599220877}
m_AddedComponents: [] m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 523332e67f2466e4f818161850bfb207, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 523332e67f2466e4f818161850bfb207, type: 3}
--- !u!1 &222782634 stripped --- !u!1 &222782634 stripped
@ -1466,6 +1606,140 @@ MonoBehaviour:
ChildScenesToLoadConfig: ChildScenesToLoadConfig:
- {fileID: 102900000, guid: a542218ba547130469444ba04f9bef35, type: 3} - {fileID: 102900000, guid: a542218ba547130469444ba04f9bef35, type: 3}
- {fileID: 102900000, guid: f77e38f2b72c5f649902d637b3a70b42, type: 3} - {fileID: 102900000, guid: f77e38f2b72c5f649902d637b3a70b42, type: 3}
--- !u!1 &677065073
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 677065074}
- component: {fileID: 677065076}
- component: {fileID: 677065075}
m_Layer: 5
m_Name: TimerText
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &677065074
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 677065073}
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1599220877}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &677065075
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 677065073}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 3
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 1a8c97d4cbe5134499b26527f8609c7e, type: 2}
m_sharedMaterial: {fileID: -466885322316925189, guid: 1a8c97d4cbe5134499b26527f8609c7e, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 200
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 18
m_fontSizeMax: 200
m_fontStyle: 32
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &677065076
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 677065073}
m_CullTransparentMesh: 1
--- !u!114 &718253141 --- !u!114 &718253141
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -8973,7 +9247,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1676734515771252668, guid: 0193228de87741d40a42e561901c9083, type: 3} - target: {fileID: 1676734515771252668, guid: 0193228de87741d40a42e561901c9083, type: 3}
propertyPath: m_LocalRotation.x propertyPath: m_LocalRotation.x
value: 0.39434478 value: 0.3943448
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1676734515771252668, guid: 0193228de87741d40a42e561901c9083, type: 3} - target: {fileID: 1676734515771252668, guid: 0193228de87741d40a42e561901c9083, type: 3}
propertyPath: m_LocalRotation.y propertyPath: m_LocalRotation.y
@ -9176,15 +9450,15 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 203267159508449512, guid: 36b3ee75677a1544191c0ddaaadd8140, type: 3} - target: {fileID: 203267159508449512, guid: 36b3ee75677a1544191c0ddaaadd8140, type: 3}
propertyPath: m_LocalRotation.x propertyPath: m_LocalRotation.x
value: 0.3943448 value: 0.39434484
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 203267159508449512, guid: 36b3ee75677a1544191c0ddaaadd8140, type: 3} - target: {fileID: 203267159508449512, guid: 36b3ee75677a1544191c0ddaaadd8140, type: 3}
propertyPath: m_LocalRotation.y propertyPath: m_LocalRotation.y
value: 0.31044647 value: 0.3104465
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 203267159508449512, guid: 36b3ee75677a1544191c0ddaaadd8140, type: 3} - target: {fileID: 203267159508449512, guid: 36b3ee75677a1544191c0ddaaadd8140, type: 3}
propertyPath: m_LocalRotation.z propertyPath: m_LocalRotation.z
value: -0.14352977 value: -0.1435298
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 203267159508449512, guid: 36b3ee75677a1544191c0ddaaadd8140, type: 3} - target: {fileID: 203267159508449512, guid: 36b3ee75677a1544191c0ddaaadd8140, type: 3}
propertyPath: m_LocalEulerAnglesHint.x propertyPath: m_LocalEulerAnglesHint.x
@ -9738,6 +10012,89 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1521032481
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1521032484}
- component: {fileID: 1521032482}
- component: {fileID: 1521032483}
- component: {fileID: 1521032485}
m_Layer: 0
m_Name: Timer
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1521032482
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1521032481}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier:
GlobalObjectIdHash: 668246528
InScenePlacedSourceGlobalObjectIdHash: 0
AlwaysReplicateAsRoot: 0
SynchronizeTransform: 1
ActiveSceneSynchronization: 0
SceneMigrationSynchronization: 1
SpawnWithObservers: 1
DontDestroyWithOwner: 0
AutoObjectParentSync: 1
--- !u!114 &1521032483
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1521032481}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 57e48970e34765c409f8b24150e0364e, type: 3}
m_Name:
m_EditorClassIdentifier:
timerText: {fileID: 107568635}
--- !u!4 &1521032484
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1521032481}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.3935692, y: -2.0585616, z: 1.68793}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1521032485
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1521032481}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 61c03f8886703024387113c51b33adde, type: 3}
m_Name:
m_EditorClassIdentifier:
timer: {fileID: 1521032483}
serverAdditiveSceneLoader: {fileID: 3765979715153886893}
timeInSeconds: 180
--- !u!1001 &1531756835 --- !u!1001 &1531756835
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -9803,6 +10160,119 @@ PrefabInstance:
m_AddedGameObjects: [] m_AddedGameObjects: []
m_AddedComponents: [] m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 0cf63be61cf984413ad0574abf99a025, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 0cf63be61cf984413ad0574abf99a025, type: 3}
--- !u!1 &1599220876
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1599220877}
- component: {fileID: 1599220879}
- component: {fileID: 1599220878}
- component: {fileID: 1599220881}
- component: {fileID: 1599220880}
m_Layer: 5
m_Name: Starting Timer
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1599220877
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1599220876}
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_ConstrainProportionsScale: 0
m_Children:
- {fileID: 677065074}
m_Father: {fileID: 222782635}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1599220878
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1599220876}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1599220879
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1599220876}
m_CullTransparentMesh: 1
--- !u!114 &1599220880
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1599220876}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b3c3ab547f835c941ba9fbd1c19731b9, type: 3}
m_Name:
m_EditorClassIdentifier:
serverAdditiveSceneLoader: {fileID: 3765979715153886893}
TimerText: {fileID: 677065075}
--- !u!114 &1599220881
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1599220876}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier:
GlobalObjectIdHash: 3351497992
InScenePlacedSourceGlobalObjectIdHash: 0
AlwaysReplicateAsRoot: 0
SynchronizeTransform: 1
ActiveSceneSynchronization: 0
SceneMigrationSynchronization: 1
SpawnWithObservers: 1
DontDestroyWithOwner: 0
AutoObjectParentSync: 1
--- !u!1001 &1637314095 --- !u!1001 &1637314095
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -118942,6 +119412,17 @@ PrefabInstance:
m_AddedGameObjects: [] m_AddedGameObjects: []
m_AddedComponents: [] m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: cc55d0a8a5047dc48905945e6431a5ec, type: 3} m_SourcePrefab: {fileID: 100100000, guid: cc55d0a8a5047dc48905945e6431a5ec, type: 3}
--- !u!114 &3765979715153886893 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3765979716845461206, guid: cc55d0a8a5047dc48905945e6431a5ec, type: 3}
m_PrefabInstance: {fileID: 3765979715153886892}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4506649f88aac74ea839a52818e3174, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &3766236890331340820 --- !u!4 &3766236890331340820
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -278514,3 +278995,4 @@ SceneRoots:
- {fileID: 1486746210} - {fileID: 1486746210}
- {fileID: 396364068} - {fileID: 396364068}
- {fileID: 7822537384937625691} - {fileID: 7822537384937625691}
- {fileID: 1521032484}

@ -0,0 +1,75 @@
using System.Collections;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
using DG.Tweening;
using Unity.Netcode;
using Unity.Multiplayer.Samples.Utilities;
public class StartingTimer : NetworkBehaviour
{
public ServerAdditiveSceneLoader serverAdditiveSceneLoader;
private Image BlackScreen;
public TextMeshProUGUI TimerText;
private NetworkVariable<int> timerValue = new NetworkVariable<int>(0, NetworkVariableReadPermission.Everyone, NetworkVariableWritePermission.Server);
private bool coroutineStartedBool = false;
private void Start()
{
BlackScreen = GetComponent<Image>();
}
private void Update()
{
if (serverAdditiveSceneLoader.m_SceneState == ServerAdditiveSceneLoader.SceneState.Loaded && coroutineStartedBool == false)
{
if (IsServer)
{
coroutineStartedBool = true;
StartCoroutine(ServerTimerCoroutine());
}
}
// Update the UI on all clients
UpdateTimerUI();
}
private IEnumerator ServerTimerCoroutine()
{
const int countdownStart = 3;
for (int i = countdownStart; i > 0; i--)
{
timerValue.Value = i;
yield return new WaitForSeconds(1);
}
timerValue.Value = -1; // Indicate "GO"
yield return new WaitForSeconds(0.5f);
// Notify clients to disable the black screen
BlackScreenAlphaDisablerClientRpc();
}
private void UpdateTimerUI()
{
if (timerValue.Value > 0)
{
TimerText.text = timerValue.Value.ToString();
}
else if (timerValue.Value == -1)
{
TimerText.text = "GO";
}
}
[ClientRpc]
private void BlackScreenAlphaDisablerClientRpc()
{
BlackScreen.DOFade(0, 0.25f).OnComplete(() =>
{
gameObject.SetActive(false);
});
}
}

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b3c3ab547f835c941ba9fbd1c19731b9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,89 @@
using System;
using Unity.Netcode;
using TMPro;
using UnityEngine;
public class SynchronizedTimer : NetworkBehaviour
{
public event Action OnTimerEnd; // Ensure it's public
[SerializeField] private TextMeshProUGUI timerText; // Reference to the TextMeshProUGUI component
private NetworkVariable<float> timer = new NetworkVariable<float>(0f, NetworkVariableReadPermission.Everyone, NetworkVariableWritePermission.Server);
private bool isTimerRunning = false;
void Update()
{
if (IsServer && isTimerRunning)
{
// Decrease the timer only on the server
timer.Value -= Time.deltaTime;
if (timer.Value <= 0)
{
timer.Value = 0;
isTimerRunning = false;
OnTimerEnd?.Invoke(); // Trigger the event on the server
}
}
// Update the UI on all clients
UpdateTimerUI();
}
/// <summary>
/// Starts the timer.
/// </summary>
/// <param name="time">The duration of the timer in seconds.</param>
[ServerRpc(RequireOwnership = false)]
public void StartTimerServerRpc(float time)
{
if (!isTimerRunning)
{
timer.Value = time;
isTimerRunning = true;
}
}
/// <summary>
/// Gets the remaining time on the timer.
/// </summary>
/// <returns>The remaining time in seconds.</returns>
public float GetRemainingTime()
{
return timer.Value;
}
// This method ensures the timer stays synchronized for clients
private void OnEnable()
{
timer.OnValueChanged += OnTimerValueChanged;
}
private void OnDisable()
{
timer.OnValueChanged -= OnTimerValueChanged;
}
private void OnTimerValueChanged(float oldValue, float newValue)
{
if (!IsServer && newValue <= 0 && oldValue > 0)
{
OnTimerEnd?.Invoke(); // Trigger the event on clients when timer reaches zero
}
}
/// <summary>
/// Updates the TextMeshProUGUI with the remaining time.
/// </summary>
private void UpdateTimerUI()
{
if (timerText != null)
{
int minutes = Mathf.FloorToInt(timer.Value / 60);
int seconds = Mathf.FloorToInt(timer.Value % 60);
timerText.text = $"{minutes:D2}:{seconds:D2}";
}
}
}

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 57e48970e34765c409f8b24150e0364e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

@ -0,0 +1,40 @@
using System.Collections;
using Unity.Multiplayer.Samples.Utilities;
using UnityEngine;
using static TMPro.SpriteAssetUtilities.TexturePacker_JsonArray;
public class TimerScript : MonoBehaviour
{
[SerializeField] private SynchronizedTimer timer;
public ServerAdditiveSceneLoader serverAdditiveSceneLoader;
public int timeInSeconds=180;
void Start()
{
if (timer != null)
{
timer.OnTimerEnd += HandleTimerEnd; // Subscribe to the event
StartCoroutine(Starter());
}
}
IEnumerator Starter()
{
yield return new WaitUntil(() => serverAdditiveSceneLoader.m_SceneState == ServerAdditiveSceneLoader.SceneState.Loaded);
if (Unity.Netcode.NetworkManager.Singleton.IsServer)
{
timer.StartTimerServerRpc(timeInSeconds); // Start a 3-minute timer
}
}
private void HandleTimerEnd()
{
Debug.Log("Timer has ended!");
// Add logic for what happens when the timer ends
}
private void OnDestroy()
{
if (timer != null)
{
timer.OnTimerEnd -= HandleTimerEnd; // Unsubscribe to avoid memory leaks
}
}
}

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 61c03f8886703024387113c51b33adde
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -35,7 +35,7 @@ namespace Unity.Multiplayer.Samples.Utilities
bool IsActive => IsServer && IsSpawned; bool IsActive => IsServer && IsSpawned;
enum SceneState public enum SceneState
{ {
Loaded, Loaded,
Unloaded, Unloaded,
@ -44,7 +44,7 @@ namespace Unity.Multiplayer.Samples.Utilities
WaitingToUnload, WaitingToUnload,
} }
SceneState m_SceneState = SceneState.Unloaded; public SceneState m_SceneState = SceneState.Unloaded;
Coroutine m_UnloadCoroutine; Coroutine m_UnloadCoroutine;

Loading…
Cancel
Save