Fixed a few things

dev-main
Hazim Bin Ijaz 3 days ago
parent 58934433f3
commit 3dc3384ef8

@ -58,7 +58,7 @@ Transform:
m_GameObject: {fileID: 247286024415336201}
serializedVersion: 2
m_LocalRotation: {x: -0.7071069, y: -0.0000000020941715, z: -9.219622e-10, w: 0.7071067}
m_LocalPosition: {x: 0.00000002026558, y: -2.9802502e-10, z: -0.000000011026859}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 100, y: 99.999985, z: 99.999985}
m_ConstrainProportionsScale: 0
m_Children: []
@ -419,8 +419,8 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 7009065623834068166}
- {fileID: 5240452332822078257}
- {fileID: 6769994715365864839}
- {fileID: 5240452332822078257}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!95 &5410456523969007138

@ -0,0 +1,417 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1262076527490927041
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7173227317131941089}
- component: {fileID: 6707084463906941226}
m_Layer: 5
m_Name: Ally HUD 1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7173227317131941089
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1262076527490927041}
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: 5833333908803516101}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 672, y: 50}
m_Pivot: {x: 0, y: 1}
--- !u!114 &6707084463906941226
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1262076527490927041}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0dd49e4fefe1c0444abd48c3b4c193be, type: 3}
m_Name:
m_EditorClassIdentifier:
PlayerClientID: 0
PlayerName: {fileID: 8477319870020313650}
PlayerScore: {fileID: 6552063526387552312}
isSelf: 0
--- !u!1 &3106543622756959031
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7437757415750544465}
- component: {fileID: 4450657992105587688}
- component: {fileID: 6552063526387552312}
m_Layer: 0
m_Name: Ally Score 1 (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7437757415750544465
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3106543622756959031}
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: 5833333908803516101}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: -176.15, y: 0.00000047683716}
m_SizeDelta: {x: 176.15, y: 55}
m_Pivot: {x: 0, y: 0.5}
--- !u!222 &4450657992105587688
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3106543622756959031}
m_CullTransparentMesh: 1
--- !u!114 &6552063526387552312
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3106543622756959031}
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: 200
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 9d164d34f5634c546ab5f9897450b32c, type: 2}
m_sharedMaterial: {fileID: 5992927229328225322, guid: 9d164d34f5634c546ab5f9897450b32c, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294962176
m_fontColor: {r: 0, g: 0.9250941, 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: 39.85
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 0
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: 1
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!1 &3815291701187245897
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3906390436817617398}
- component: {fileID: 7291509203009302444}
- component: {fileID: 8477319870020313650}
m_Layer: 0
m_Name: Ally Name 1 (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3906390436817617398
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3815291701187245897}
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: 5833333908803516101}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0.74711}
m_SizeDelta: {x: 325, y: 55.494}
m_Pivot: {x: 0, y: 0.5}
--- !u!222 &7291509203009302444
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3815291701187245897}
m_CullTransparentMesh: 1
--- !u!114 &8477319870020313650
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3815291701187245897}
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: Ally Name
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 9d164d34f5634c546ab5f9897450b32c, type: 2}
m_sharedMaterial: {fileID: 5992927229328225322, guid: 9d164d34f5634c546ab5f9897450b32c, 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: 40.2
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 0
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: 1
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!1 &5033784294000159843
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5833333908803516101}
- component: {fileID: 4321986830500661751}
m_Layer: 5
m_Name: Button
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5833333908803516101
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5033784294000159843}
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: 3906390436817617398}
- {fileID: 7437757415750544465}
m_Father: {fileID: 7173227317131941089}
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: 1}
m_Pivot: {x: 0, y: 0.5}
--- !u!114 &4321986830500661751
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5033784294000159843}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dbf2ca28c45656f418648a12d4aec6c8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 0
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 0}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 0}
m_TargetAssemblyTypeName: BossRoom.Visual.PartyHUD, BossRoom.Client
m_MethodName: SelectPartyMember
m_Mode: 3
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 1
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 2767188ecdb51424ea6b5e167755f497
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -2664,6 +2664,108 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 283391569}
m_CullTransparentMesh: 1
--- !u!1001 &285833579
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 1117367852}
m_Modifications:
- target: {fileID: 1262076527490927041, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_Name
value: Ally HUD 1 (2)
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_Pivot.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_Pivot.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_SizeDelta.x
value: 672
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_SizeDelta.y
value: 50
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_AnchoredPosition.x
value: 114
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_AnchoredPosition.y
value: -130.8
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
--- !u!224 &285833580 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
m_PrefabInstance: {fileID: 285833579}
m_PrefabAsset: {fileID: 0}
--- !u!1 &308008434
GameObject:
m_ObjectHideFlags: 0
@ -4377,6 +4479,7 @@ MonoBehaviour:
Parent: {fileID: 1527274046}
FinalParent: {fileID: 1117367852}
FinalLeaderBoardObj: {fileID: 1388188196}
FinalLeaderBoardItem: {fileID: 0}
--- !u!114 &476537029
MonoBehaviour:
m_ObjectHideFlags: 0
@ -5279,6 +5382,7 @@ MonoBehaviour:
PlayerClientID: 0
PlayerName: {fileID: 693344909}
PlayerScore: {fileID: 1833684243}
isSelf: 0
--- !u!1 &546116282
GameObject:
m_ObjectHideFlags: 0
@ -7769,6 +7873,7 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 731395403}
- component: {fileID: 731395405}
- component: {fileID: 731395404}
m_Layer: 5
m_Name: WarningPanel
@ -7810,6 +7915,27 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
panel: {fileID: 1586538565}
--- !u!114 &731395405
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 731395402}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier:
GlobalObjectIdHash: 2275532059
InScenePlacedSourceGlobalObjectIdHash: 0
AlwaysReplicateAsRoot: 0
SynchronizeTransform: 1
ActiveSceneSynchronization: 0
SceneMigrationSynchronization: 1
SpawnWithObservers: 1
DontDestroyWithOwner: 0
AutoObjectParentSync: 1
--- !u!1 &732850150
GameObject:
m_ObjectHideFlags: 0
@ -19268,7 +19394,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 1676734516724634599, guid: 0193228de87741d40a42e561901c9083, type: 3}
propertyPath: m_LocalRotation.w
value: 0.80276686
value: 0.8027669
objectReference: {fileID: 0}
- target: {fileID: 1676734516724634599, guid: 0193228de87741d40a42e561901c9083, type: 3}
propertyPath: m_LocalRotation.x
@ -19276,11 +19402,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 1676734516724634599, guid: 0193228de87741d40a42e561901c9083, type: 3}
propertyPath: m_LocalRotation.y
value: 0.2921833
value: 0.29218328
objectReference: {fileID: 0}
- target: {fileID: 1676734516724634599, guid: 0193228de87741d40a42e561901c9083, type: 3}
propertyPath: m_LocalRotation.z
value: -0.17778286
value: -0.17778282
objectReference: {fileID: 0}
- target: {fileID: 1676734516866984540, guid: 0193228de87741d40a42e561901c9083, type: 3}
propertyPath: m_VerticalDamping
@ -19689,6 +19815,108 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1067234374}
m_Mesh: {fileID: 513405630301119058, guid: 47a0b308de0389c438e1e2fecc4a557a, type: 3}
--- !u!1001 &1075194842
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 1117367852}
m_Modifications:
- target: {fileID: 1262076527490927041, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_Name
value: Ally HUD 1 (1)
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_Pivot.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_Pivot.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_SizeDelta.x
value: 672
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_SizeDelta.y
value: 50
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_AnchoredPosition.x
value: 114
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_AnchoredPosition.y
value: -65.4
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
--- !u!224 &1075194843 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
m_PrefabInstance: {fileID: 1075194842}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1084627101
GameObject:
m_ObjectHideFlags: 0
@ -20145,7 +20373,10 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Children:
- {fileID: 1882185081}
- {fileID: 1075194843}
- {fileID: 285833580}
m_Father: {fileID: 992061976}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
@ -20171,7 +20402,7 @@ MonoBehaviour:
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 1
m_Spacing: 0
m_Spacing: 15.4
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 0
@ -21402,6 +21633,7 @@ MonoBehaviour:
PlayerClientID: 0
PlayerName: {fileID: 1957553662}
PlayerScore: {fileID: 398825400}
isSelf: 0
--- !u!1 &1208368959
GameObject:
m_ObjectHideFlags: 0
@ -23170,6 +23402,8 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 1388188197}
- component: {fileID: 1388188199}
- component: {fileID: 1388188198}
m_Layer: 5
m_Name: FinalLeaderBoard
m_TagString: Untagged
@ -23197,6 +23431,44 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1388188198
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1388188196}
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 &1388188199
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1388188196}
m_CullTransparentMesh: 1
--- !u!1 &1391471571
GameObject:
m_ObjectHideFlags: 0
@ -23616,6 +23888,7 @@ MonoBehaviour:
PlayerClientID: 0
PlayerName: {fileID: 1671217443}
PlayerScore: {fileID: 1185809258}
isSelf: 0
--- !u!1 &1434471757
GameObject:
m_ObjectHideFlags: 0
@ -24195,7 +24468,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
timer: {fileID: 1521032483}
serverAdditiveSceneLoader: {fileID: 3765979715153886893}
timeInSeconds: 1200
timeInSeconds: 200
--- !u!1 &1527274045
GameObject:
m_ObjectHideFlags: 0
@ -25613,6 +25886,7 @@ MonoBehaviour:
PlayerClientID: 0
PlayerName: {fileID: 70597788}
PlayerScore: {fileID: 795181666}
isSelf: 0
--- !u!1001 &1637314095
PrefabInstance:
m_ObjectHideFlags: 0
@ -29186,6 +29460,108 @@ Transform:
m_CorrespondingSourceObject: {fileID: 6439686966124553665, guid: 0abe201761002ad4dab2c2bbd4f64fb9, type: 3}
m_PrefabInstance: {fileID: 1874713180}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1882185080
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 1117367852}
m_Modifications:
- target: {fileID: 1262076527490927041, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_Name
value: Ally HUD 1
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_Pivot.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_Pivot.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_SizeDelta.x
value: 672
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_SizeDelta.y
value: 50
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_AnchoredPosition.x
value: 114
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
--- !u!224 &1882185081 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 7173227317131941089, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
m_PrefabInstance: {fileID: 1882185080}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1883417341
GameObject:
m_ObjectHideFlags: 0
@ -30556,6 +30932,7 @@ MonoBehaviour:
PlayerClientID: 0
PlayerName: {fileID: 1751680362}
PlayerScore: {fileID: 2070694943}
isSelf: 0
--- !u!1 &2062419798
GameObject:
m_ObjectHideFlags: 0
@ -31856,6 +32233,7 @@ MonoBehaviour:
PlayerClientID: 0
PlayerName: {fileID: 741627955}
PlayerScore: {fileID: 1861536868}
isSelf: 0
--- !u!4 &4181979606490317
Transform:
m_ObjectHideFlags: 0
@ -33753,6 +34131,7 @@ MonoBehaviour:
PlayerClientID: 0
PlayerName: {fileID: 1216284578757756462}
PlayerScore: {fileID: 1905540601}
isSelf: 0
--- !u!1 &104409276672852120
GameObject:
m_ObjectHideFlags: 0
@ -55583,6 +55962,7 @@ MonoBehaviour:
PlayerClientID: 0
PlayerName: {fileID: 7816651128272281083}
PlayerScore: {fileID: 17393956261454146}
isSelf: 0
--- !u!33 &512640185592200466
MeshFilter:
m_ObjectHideFlags: 0
@ -271676,6 +272056,7 @@ MonoBehaviour:
PlayerClientID: 0
PlayerName: {fileID: 4041770393132420617}
PlayerScore: {fileID: 6680167601263188673}
isSelf: 0
--- !u!1 &4925682214732485692
GameObject:
m_ObjectHideFlags: 0
@ -300362,6 +300743,7 @@ MonoBehaviour:
PlayerClientID: 0
PlayerName: {fileID: 313793918610732724}
PlayerScore: {fileID: 7136488523868346069}
isSelf: 0
--- !u!23 &5398114506461861206
MeshRenderer:
m_ObjectHideFlags: 0
@ -300730,6 +301112,7 @@ MonoBehaviour:
PlayerClientID: 0
PlayerName: {fileID: 3183995931517152604}
PlayerScore: {fileID: 401523598460796889}
isSelf: 0
--- !u!64 &5408433677146982691
MeshCollider:
m_ObjectHideFlags: 0
@ -365210,6 +365593,7 @@ MonoBehaviour:
Parent: {fileID: 563824173874958638}
FinalParent: {fileID: 1117367852}
FinalLeaderBoardObj: {fileID: 1388188196}
FinalLeaderBoardItem: {fileID: 1262076527490927041, guid: 2767188ecdb51424ea6b5e167755f497, type: 3}
--- !u!33 &6955977944545338967
MeshFilter:
m_ObjectHideFlags: 0
@ -404267,6 +404651,7 @@ MonoBehaviour:
PlayerClientID: 0
PlayerName: {fileID: 9213262536610523171}
PlayerScore: {fileID: 2608494362328213182}
isSelf: 0
--- !u!198 &7792419176430592805
ParticleSystem:
m_ObjectHideFlags: 0
@ -488182,6 +488567,7 @@ MonoBehaviour:
PlayerClientID: 0
PlayerName: {fileID: 6214557167038242316}
PlayerScore: {fileID: 4692765786707208408}
isSelf: 0
--- !u!4 &9161816784169926433
Transform:
m_ObjectHideFlags: 0
@ -488212,6 +488598,7 @@ MonoBehaviour:
PlayerClientID: 0
PlayerName: {fileID: 5514594664108574701}
PlayerScore: {fileID: 7913959036416070758}
isSelf: 0
--- !u!1 &9162989051642113681
GameObject:
m_ObjectHideFlags: 0

@ -11,10 +11,7 @@ using TMPro;
public ulong PlayerClientID;
public TextMeshProUGUI PlayerName;
public TextMeshProUGUI PlayerScore;
private void Start()
{
}
public bool isSelf = false;
}
//}

@ -3,6 +3,8 @@ using Unity.Multiplayer.Samples.BossRoom;
using UnityEngine;
using Unity.Netcode;
using System.Linq;
using Unity.BossRoom.Gameplay.GameplayObjects;
using Unity.BossRoom.Gameplay.GameplayObjects.Character;
public class Scoreboard : NetworkBehaviour
{
@ -12,6 +14,7 @@ public class Scoreboard : NetworkBehaviour
public GameObject playerItemPrefab;
public Transform Parent, FinalParent;
public GameObject FinalLeaderBoardObj;
public GameObject FinalLeaderBoardItem;
public static Scoreboard Instance { get; private set; }
@ -34,12 +37,14 @@ public class Scoreboard : NetworkBehaviour
? dummyPlayerItems[0]
: dummyPlayerItems[counter++];
item.isSelf = NetworkManager.Singleton.LocalClientId == clientId;
item.gameObject.SetActive(true);
item.PlayerName.text = name;
item.PlayerScore.text = score.ToString();
item.PlayerClientID = clientId;
playerItems.Add(item);
if (NetworkManager.Singleton.LocalClientId != clientId)
playerItemsForSort.Add(item);
}
@ -64,14 +69,52 @@ public class Scoreboard : NetworkBehaviour
public void FinalLeaderBoard()
{
if (IsServer) FinalLeaderBoardClientRPC();
Debug.Log("FinalLeaderBoard. Item Count: " + playerItems.Count);
var scoredItems = playerItems
.Select(go => new
{
src = go,
score = int.Parse(go.GetComponent<PlayerItem>().PlayerScore.text)
})
// 2) Sort by score descending (highest first)
.OrderByDescending(x => x.score)
.ToList();
foreach (var entry in scoredItems)
{
var spawned = Instantiate(FinalLeaderBoardItem, FinalParent);
var dstItem = spawned.GetComponent<PlayerItem>();
var srcItem = entry.src.GetComponent<PlayerItem>();
dstItem.PlayerName.text = srcItem.PlayerName.text;
dstItem.PlayerScore.text = entry.score.ToString();
if (srcItem.isSelf)
{
dstItem.PlayerName.color = Color.green;
dstItem.PlayerScore.color = Color.green;
}
}
FinalLeaderBoardObj.SetActive(true);
}
[ClientRpc]
private void FinalLeaderBoardClientRPC()
{
Debug.Log("FinalLeaderBoardClientRPC");
playerItems.ForEach(item => Instantiate(item, FinalParent).gameObject.SetActive(true));
for (int i = 0; i < playerItems.Count; i++)
{
GameObject itemSpawned = Instantiate(FinalLeaderBoardItem, FinalParent);
itemSpawned.GetComponent<PlayerItem>().PlayerName.text = playerItems[i].GetComponent<PlayerItem>().PlayerName.text;
itemSpawned.GetComponent<PlayerItem>().PlayerScore.text = playerItems[i].GetComponent<PlayerItem>().PlayerScore.text;
}
// playerItems.ForEach(item => Instantiate(item, FinalParent).gameObject.SetActive(true));
FinalLeaderBoardObj.SetActive(true);
}

@ -5,7 +5,7 @@ using UnityEngine;
public class SynchronizedTimer : NetworkBehaviour
{
public event Action OnTimerEnd;
public Action OnTimerEnd;
[SerializeField] private TextMeshProUGUI timerText;
@ -29,7 +29,7 @@ public class SynchronizedTimer : NetworkBehaviour
{
timer.Value = 0;
isTimerRunning = false;
OnTimerEnd?.Invoke();
// OnTimerEnd?.Invoke();
}
UpdateTimerUI();
}

@ -1,20 +1,30 @@
using System;
using System.Collections;
using Unity.Multiplayer.Samples.Utilities;
using Unity.Netcode;
using UnityEngine;
public class TimerScript : MonoBehaviour
public class TimerScript : NetworkBehaviour
{
[SerializeField] private SynchronizedTimer timer;
public ServerAdditiveSceneLoader serverAdditiveSceneLoader;
public int timeInSeconds = 180;
public int timeInSeconds;
private void OnEnable()
{
timer.OnTimerEnd += HandleTimerEnd;
}
private void OnDisable()
{
timer.OnTimerEnd -= HandleTimerEnd;
}
void Start()
{
if (timer != null)
{
timeInSeconds = 1200;
timer.OnTimerEnd += HandleTimerEnd;
Debug.Log("Timer started call sent");
StartCoroutine(Starter());
}
@ -35,14 +45,15 @@ public class TimerScript : MonoBehaviour
private void HandleTimerEnd()
{
Debug.Log("Timer has ended!");
Scoreboard.Instance.FinalLeaderBoard();
if(IsServer)
OnTimerEndClientRPC();
}
private void OnDestroy()
{
if (timer != null)
[Rpc(SendTo.NotOwner)]
private void OnTimerEndClientRPC()
{
timer.OnTimerEnd -= HandleTimerEnd;
}
Debug.Log("OnTimerEndClientRPC called!");
Scoreboard.Instance.FinalLeaderBoard();
}
}

Loading…
Cancel
Save