game over UI done, rematch left
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f896459688bf7ab4db4e30a6ccfc1c0a
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
File diff suppressed because one or more lines are too long
+56
-29
@@ -1,30 +1,57 @@
|
|||||||
Logger initiated at 5/1/2026 6:51:10 PM
|
Logger initiated at 5/2/2026 10:17:33 PM
|
||||||
|
|
||||||
[5/1/2026 6:51:10 PM] Invalid Room port
|
[5/2/2026 10:17:33 PM] Cupid init success
|
||||||
[5/1/2026 6:51:10 PM] Failed to fetch red and blue names, isServer?
|
[5/2/2026 10:17:33 PM] Starting matchmake as warlock2
|
||||||
[5/1/2026 6:51:23 PM] Client connected
|
[5/2/2026 10:17:34 PM] Starting matchmake as warlock
|
||||||
[5/1/2026 6:51:25 PM] Client connected
|
[5/2/2026 10:17:38 PM] Got into a room
|
||||||
[5/1/2026 6:51:25 PM] Game started On Server
|
[5/2/2026 10:17:38 PM] {"Players":[{"Name":"warlock","LastSeen":1777740457910,"UserId":4,"l10_wins":1,"l10_losses":0}],"GameName":"soccar","Port":26494,"InitTime":1777740457910,"match_id":236,"your_team":"red"}
|
||||||
[5/1/2026 6:51:25 PM] Client 16 set team to Red
|
[5/2/2026 10:17:38 PM] Got into a room
|
||||||
[5/1/2026 6:51:34 PM] force = 70 * 0.9955804 = 69.69063
|
[5/2/2026 10:17:38 PM] {"Players":[{"Name":"warlock","LastSeen":1777740457910,"UserId":4,"l10_wins":1,"l10_losses":0},{"Name":"warlock2","LastSeen":1777740458378,"UserId":5,"l10_wins":0,"l10_losses":1}],"GameName":"soccar","Port":26494,"InitTime":1777740457910,"match_id":236,"instance_started":true,"your_team":"blue"}
|
||||||
[5/1/2026 6:51:34 PM] launching puck at (1.16, -4.86) with (-80.61, 339.00) force
|
[5/2/2026 10:17:38 PM] Configured dedicated match reporting for match id 236 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base https://kickkingsapi.playpoolstudios.com
|
||||||
[5/1/2026 6:51:38 PM] Selected team changed from Red to Blue
|
[5/2/2026 10:17:38 PM] Setting cupid to load game scene
|
||||||
[5/1/2026 6:51:38 PM] Selected team changed from Red to Blue
|
[5/2/2026 10:17:38 PM] Loading game scene
|
||||||
[5/1/2026 6:51:43 PM] force = 70 * 0.8207608 = 57.45326
|
[5/2/2026 10:17:39 PM] Got into a room
|
||||||
[5/1/2026 6:51:43 PM] launching puck at (-1.03, 3.15) with (59.17, -180.82) force
|
[5/2/2026 10:17:39 PM] {"Players":[{"Name":"warlock","LastSeen":1777740459663,"UserId":4,"l10_wins":1,"l10_losses":0},{"Name":"warlock2","LastSeen":1777740458378,"UserId":5,"l10_wins":0,"l10_losses":1}],"GameName":"soccar","Port":26494,"InitTime":1777740457910,"match_id":236,"instance_started":true,"your_team":"red"}
|
||||||
[5/1/2026 6:51:47 PM] Selected team changed from Blue to Red
|
[5/2/2026 10:17:39 PM] Configured dedicated match reporting for match id 236 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base https://kickkingsapi.playpoolstudios.com
|
||||||
[5/1/2026 6:51:47 PM] Selected team changed from Blue to Red
|
[5/2/2026 10:17:39 PM] Setting cupid to load game scene
|
||||||
[5/1/2026 6:52:02 PM] Selected team changed from Red to Blue
|
[5/2/2026 10:17:39 PM] Loading game scene
|
||||||
[5/1/2026 6:52:02 PM] Selected team changed from Red to Blue
|
[5/2/2026 10:17:45 PM] Starting client at $kickkingsapi.playpoolstudios.com:26494
|
||||||
[5/1/2026 6:52:16 PM] force = 70 * 0.9955804 = 69.69063
|
[5/2/2026 10:17:45 PM] Client connected
|
||||||
[5/1/2026 6:52:16 PM] launching puck at (-0.32, 4.99) with (22.12, -347.75) force
|
[5/2/2026 10:17:50 PM] Starting client at $kickkingsapi.playpoolstudios.com:26494
|
||||||
[5/1/2026 6:52:20 PM] Selected team changed from Blue to Red
|
[5/2/2026 10:17:50 PM] Client connected
|
||||||
[5/1/2026 6:52:20 PM] Selected team changed from Blue to Red
|
[5/2/2026 10:17:59 PM] Selected team changed from Red to Blue
|
||||||
[5/1/2026 6:52:32 PM] force = 70 * 0.9955804 = 69.69063
|
[5/2/2026 10:17:59 PM] Selected team changed from Red to Blue
|
||||||
[5/1/2026 6:52:32 PM] launching puck at (0.62, -4.96) with (-42.96, 345.80) force
|
[5/2/2026 10:18:09 PM] Selected team changed from Blue to Red
|
||||||
[5/1/2026 6:52:35 PM] Selected team changed from Red to Blue
|
[5/2/2026 10:18:10 PM] Selected team changed from Blue to Red
|
||||||
[5/1/2026 6:52:35 PM] Selected team changed from Red to Blue
|
[5/2/2026 10:18:15 PM] Selected team changed from Red to Blue
|
||||||
[5/1/2026 6:52:41 PM] force = 70 * 0.9955804 = 69.69063
|
[5/2/2026 10:18:15 PM] Selected team changed from Red to Blue
|
||||||
[5/1/2026 6:52:41 PM] launching puck at (0.74, 4.94) with (-51.68, -344.60) force
|
[5/2/2026 10:18:21 PM] Selected team changed from Blue to Red
|
||||||
[5/1/2026 6:52:42 PM] Client disconnected
|
[5/2/2026 10:18:21 PM] Selected team changed from Blue to Red
|
||||||
[5/1/2026 6:52:42 PM] Client disconnected
|
[5/2/2026 10:18:25 PM] Selected team changed from Red to Blue
|
||||||
|
[5/2/2026 10:18:25 PM] Selected team changed from Red to Blue
|
||||||
|
[5/2/2026 10:18:33 PM] Selected team changed from Blue to Red
|
||||||
|
[5/2/2026 10:18:33 PM] Selected team changed from Blue to Red
|
||||||
|
[5/2/2026 10:18:37 PM] Score changed from 0 to 1
|
||||||
|
[5/2/2026 10:18:37 PM] Score changed from 0 to 1
|
||||||
|
[5/2/2026 10:18:40 PM] Selected team changed from Red to Blue
|
||||||
|
[5/2/2026 10:18:40 PM] Selected team changed from Red to Blue
|
||||||
|
[5/2/2026 10:18:48 PM] Selected team changed from Blue to Red
|
||||||
|
[5/2/2026 10:18:48 PM] Selected team changed from Blue to Red
|
||||||
|
[5/2/2026 10:18:54 PM] Score changed from 1 to 2
|
||||||
|
[5/2/2026 10:18:54 PM] Score changed from 1 to 2
|
||||||
|
[5/2/2026 10:18:57 PM] Selected team changed from Red to Blue
|
||||||
|
[5/2/2026 10:18:57 PM] Selected team changed from Red to Blue
|
||||||
|
[5/2/2026 10:19:05 PM] Selected team changed from Blue to Red
|
||||||
|
[5/2/2026 10:19:05 PM] Selected team changed from Blue to Red
|
||||||
|
[5/2/2026 10:19:11 PM] Selected team changed from Red to Blue
|
||||||
|
[5/2/2026 10:19:12 PM] Selected team changed from Red to Blue
|
||||||
|
[5/2/2026 10:19:19 PM] Selected team changed from Blue to Red
|
||||||
|
[5/2/2026 10:19:19 PM] Selected team changed from Blue to Red
|
||||||
|
[5/2/2026 10:19:27 PM] Selected team changed from Red to Blue
|
||||||
|
[5/2/2026 10:19:27 PM] Selected team changed from Red to Blue
|
||||||
|
[5/2/2026 10:19:34 PM] Selected team changed from Blue to Red
|
||||||
|
[5/2/2026 10:19:34 PM] Score changed from 2 to 3
|
||||||
|
[5/2/2026 10:19:34 PM] Selected team changed from Blue to Red
|
||||||
|
[5/2/2026 10:19:34 PM] Score changed from 2 to 3
|
||||||
|
[5/2/2026 10:19:37 PM] Client disconnected
|
||||||
|
[5/2/2026 10:19:38 PM] Client disconnected
|
||||||
|
|||||||
+4434
-3
File diff suppressed because it is too large
Load Diff
@@ -994,6 +994,81 @@ CanvasRenderer:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 262829306}
|
m_GameObject: {fileID: 262829306}
|
||||||
m_CullTransparentMesh: 1
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!1 &310557798
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 310557799}
|
||||||
|
- component: {fileID: 310557801}
|
||||||
|
- component: {fileID: 310557800}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Image
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &310557799
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 310557798}
|
||||||
|
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: 874144766}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 2.17, y: 6.3}
|
||||||
|
m_SizeDelta: {x: 40, y: 40}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &310557800
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 310557798}
|
||||||
|
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: 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_Sprite: {fileID: 21300000, guid: 901d64fc6ad9d44799c2ad0fd4f182d2, type: 3}
|
||||||
|
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 &310557801
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 310557798}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
--- !u!1 &321154575
|
--- !u!1 &321154575
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -2368,6 +2443,8 @@ MonoBehaviour:
|
|||||||
btnPaste: {fileID: 1461098659}
|
btnPaste: {fileID: 1461098659}
|
||||||
inputCryptoAddress: {fileID: 988871517}
|
inputCryptoAddress: {fileID: 988871517}
|
||||||
txtWithdrawStatus: {fileID: 991656203}
|
txtWithdrawStatus: {fileID: 991656203}
|
||||||
|
toggleSfx: {fileID: 874144771}
|
||||||
|
toggleMusic: {fileID: 830868273}
|
||||||
--- !u!4 &656934059
|
--- !u!4 &656934059
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -3190,6 +3267,356 @@ CanvasRenderer:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 766930791}
|
m_GameObject: {fileID: 766930791}
|
||||||
m_CullTransparentMesh: 1
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!1 &830868267
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 830868268}
|
||||||
|
- component: {fileID: 830868272}
|
||||||
|
- component: {fileID: 830868271}
|
||||||
|
- component: {fileID: 830868270}
|
||||||
|
- component: {fileID: 830868269}
|
||||||
|
- component: {fileID: 830868274}
|
||||||
|
- component: {fileID: 830868273}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: btn_toggle_music
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &830868268
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 830868267}
|
||||||
|
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: 1396154653}
|
||||||
|
m_Father: {fileID: 1916105515}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 102.62}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &830868269
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 830868267}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 4e4c65221cd965e45853c892a9facd82, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
scaleFactor: 1.1
|
||||||
|
duration: 0.1
|
||||||
|
ease: 27
|
||||||
|
--- !u!114 &830868270
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 830868267}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Delegates: []
|
||||||
|
--- !u!114 &830868271
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 830868267}
|
||||||
|
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: 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_Sprite: {fileID: 21300000, guid: cb37917483ee24fea8fab306393441e5, type: 3}
|
||||||
|
m_Type: 1
|
||||||
|
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 &830868272
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 830868267}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &830868273
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 830868267}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 32dd41e420d0032409b03beba9058456, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
toggleSpriteData:
|
||||||
|
- target: {fileID: 830868271}
|
||||||
|
onSprite: {fileID: 21300000, guid: cb37917483ee24fea8fab306393441e5, type: 3}
|
||||||
|
offSprite: {fileID: 21300000, guid: 681db73f19fb24efe843aad713eccb43, type: 3}
|
||||||
|
- target: {fileID: 1396154654}
|
||||||
|
onSprite: {fileID: 21300000, guid: eb165af05aa2e4ab2bcad217611774b8, type: 3}
|
||||||
|
offSprite: {fileID: 21300000, guid: b1f42bbbfffc44202b66381ab8b622ee, type: 3}
|
||||||
|
isOn: 0
|
||||||
|
onToggleValueChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
--- !u!114 &830868274
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 830868267}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, 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: 1
|
||||||
|
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: 830868271}
|
||||||
|
m_OnClick:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
--- !u!1 &874144765
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 874144766}
|
||||||
|
- component: {fileID: 874144770}
|
||||||
|
- component: {fileID: 874144769}
|
||||||
|
- component: {fileID: 874144768}
|
||||||
|
- component: {fileID: 874144767}
|
||||||
|
- component: {fileID: 874144772}
|
||||||
|
- component: {fileID: 874144771}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: btn_toggle_sfx
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &874144766
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 874144765}
|
||||||
|
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: 310557799}
|
||||||
|
m_Father: {fileID: 1916105515}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 102.6215}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &874144767
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 874144765}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 4e4c65221cd965e45853c892a9facd82, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
scaleFactor: 1.1
|
||||||
|
duration: 0.1
|
||||||
|
ease: 27
|
||||||
|
--- !u!114 &874144768
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 874144765}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Delegates: []
|
||||||
|
--- !u!114 &874144769
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 874144765}
|
||||||
|
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: 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_Sprite: {fileID: 21300000, guid: cb37917483ee24fea8fab306393441e5, type: 3}
|
||||||
|
m_Type: 1
|
||||||
|
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 &874144770
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 874144765}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &874144771
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 874144765}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 32dd41e420d0032409b03beba9058456, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
toggleSpriteData:
|
||||||
|
- target: {fileID: 874144769}
|
||||||
|
onSprite: {fileID: 21300000, guid: cb37917483ee24fea8fab306393441e5, type: 3}
|
||||||
|
offSprite: {fileID: 21300000, guid: 681db73f19fb24efe843aad713eccb43, type: 3}
|
||||||
|
- target: {fileID: 310557800}
|
||||||
|
onSprite: {fileID: 21300000, guid: 901d64fc6ad9d44799c2ad0fd4f182d2, type: 3}
|
||||||
|
offSprite: {fileID: 21300000, guid: 78757b0623f3b4309b7cc69c4769ae37, type: 3}
|
||||||
|
isOn: 0
|
||||||
|
onToggleValueChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
--- !u!114 &874144772
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 874144765}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, 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: 1
|
||||||
|
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: 874144769}
|
||||||
|
m_OnClick:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
--- !u!1 &938086566
|
--- !u!1 &938086566
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -5077,6 +5504,81 @@ CanvasRenderer:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1384670735}
|
m_GameObject: {fileID: 1384670735}
|
||||||
m_CullTransparentMesh: 1
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!1 &1396154652
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1396154653}
|
||||||
|
- component: {fileID: 1396154655}
|
||||||
|
- component: {fileID: 1396154654}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Image
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1396154653
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1396154652}
|
||||||
|
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: 830868268}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 2.17, y: 6.3}
|
||||||
|
m_SizeDelta: {x: 40, y: 40}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &1396154654
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1396154652}
|
||||||
|
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: 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_Sprite: {fileID: 21300000, guid: eb165af05aa2e4ab2bcad217611774b8, type: 3}
|
||||||
|
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 &1396154655
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1396154652}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
--- !u!1 &1458308255
|
--- !u!1 &1458308255
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -7434,7 +7936,9 @@ RectTransform:
|
|||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children:
|
||||||
|
- {fileID: 874144766}
|
||||||
|
- {fileID: 830868268}
|
||||||
m_Father: {fileID: 944599434}
|
m_Father: {fileID: 944599434}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
|
|||||||
@@ -307,6 +307,9 @@ public class GameManager : NetworkBehaviour
|
|||||||
void OnSelectedPuckChanged(Puck oldPuck, Puck newPuck){
|
void OnSelectedPuckChanged(Puck oldPuck, Puck newPuck){
|
||||||
// Logger.Log($"Selected puck changed from {oldPuck} to {newPuck}");
|
// Logger.Log($"Selected puck changed from {oldPuck} to {newPuck}");
|
||||||
GameEvents.OnSelectedPuckChanged?.Invoke(newPuck);
|
GameEvents.OnSelectedPuckChanged?.Invoke(newPuck);
|
||||||
|
if (newPuck == null && isClient && CameraEffects.instance != null){
|
||||||
|
CameraEffects.instance.ReleaseStretchFactor();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static Puck SelectedPuck{
|
public static Puck SelectedPuck{
|
||||||
get{
|
get{
|
||||||
@@ -393,6 +396,11 @@ public class GameManager : NetworkBehaviour
|
|||||||
}
|
}
|
||||||
|
|
||||||
turnTimerCounter = 0;
|
turnTimerCounter = 0;
|
||||||
|
// Clear any active drag/selection before changing turns.
|
||||||
|
// This prevents stale selected-puck visuals when the timer expires mid-hold.
|
||||||
|
if (selectedPuck != null){
|
||||||
|
SetSelectedPuck(null);
|
||||||
|
}
|
||||||
|
|
||||||
SelectedTeam = SelectedTeam == Team.Red ? Team.Blue : Team.Red;
|
SelectedTeam = SelectedTeam == Team.Red ? Team.Blue : Team.Red;
|
||||||
OnTeamChanged?.Invoke(SelectedTeam);
|
OnTeamChanged?.Invoke(SelectedTeam);
|
||||||
@@ -683,7 +691,8 @@ public class GameManager : NetworkBehaviour
|
|||||||
StopClient();
|
StopClient();
|
||||||
|
|
||||||
LevelLoadManager.instance.SetupGameOver(team,redScore,blueScore);
|
LevelLoadManager.instance.SetupGameOver(team,redScore,blueScore);
|
||||||
LevelLoadManager.LoadLevel("MainMenu");
|
GameOverCanvas.instance.Show(team, MyTeam, redScore, blueScore);
|
||||||
|
// LevelLoadManager.LoadLevel("MainMenu");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Leave(){
|
public void Leave(){
|
||||||
|
|||||||
@@ -0,0 +1,263 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
using DG.Tweening;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using TMPro;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
public class GameOverCanvas : MonoBehaviour
|
||||||
|
{
|
||||||
|
public bool showOnLoad = false;
|
||||||
|
CanvasGroup canvasGroup;
|
||||||
|
[Header("Intro items")]
|
||||||
|
public RectTransform[] middleScalingItems;
|
||||||
|
public RectTransform[] comingFromMiddle;
|
||||||
|
public RectTransform[] prizeFrames;
|
||||||
|
public RectTransform[] comingDown;
|
||||||
|
|
||||||
|
Dictionary<RectTransform, Vector3> OriginalPositions;
|
||||||
|
Dictionary<RectTransform, Vector3> OriginalScales;
|
||||||
|
|
||||||
|
[Header("Values")]
|
||||||
|
public TMP_Text p1_name;
|
||||||
|
public TMP_Text p1_l10;
|
||||||
|
public TMP_Text p2_name;
|
||||||
|
public TMP_Text p2_l10;
|
||||||
|
|
||||||
|
public GameObject p1_red,p2_red,p1_blue,p2_blue;
|
||||||
|
public Image p1_icon, p2_icon;
|
||||||
|
public Sprite redIcon, blueIcon;
|
||||||
|
|
||||||
|
public RectTransform p1_winner, p2_winner;
|
||||||
|
[Header("Rematch")]
|
||||||
|
public Button btnRematch;
|
||||||
|
public Button btnLeave;
|
||||||
|
public GameObject rematchWarningLoser;
|
||||||
|
public TMP_Text txtRewardRC;
|
||||||
|
public TMP_Text txtRewardCC;
|
||||||
|
public TMP_Text countdownTxt;
|
||||||
|
string returningToMenuText;
|
||||||
|
|
||||||
|
public float returnToMenuCountdown = 15f;
|
||||||
|
|
||||||
|
public static GameOverCanvas instance;
|
||||||
|
|
||||||
|
void Awake()
|
||||||
|
{
|
||||||
|
instance = this;
|
||||||
|
canvasGroup = GetComponent<CanvasGroup>();
|
||||||
|
Hide();
|
||||||
|
|
||||||
|
CollectOriginalPositionsAndScales();
|
||||||
|
|
||||||
|
returningToMenuText = countdownTxt.text;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
if(showOnLoad){
|
||||||
|
if(LevelLoadManager.instance == null){ //Load dummy data for testing
|
||||||
|
LevelLoadManager.myPlayer = new MatchmadePlayer(){Name = "test p1", l10_wins = 3, l10_losses = 1};
|
||||||
|
LevelLoadManager.opponentPlayer = new MatchmadePlayer(){Name = "test p2", l10_wins = 1, l10_losses = 3};
|
||||||
|
}
|
||||||
|
Show(Team.Red, Team.Red, 3, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
btnRematch.onClick.AddListener(OnBtnRematchClicked);
|
||||||
|
btnLeave.onClick.AddListener(OnBtnLeaveGameClicked);
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnBtnRematchClicked(){
|
||||||
|
// LevelLoadManager.LoadLevel("Game");
|
||||||
|
}
|
||||||
|
void OnBtnLeaveGameClicked(){
|
||||||
|
LevelLoadManager.LoadLevel("MainMenu");
|
||||||
|
}
|
||||||
|
|
||||||
|
void CollectOriginalPositionsAndScales(){
|
||||||
|
OriginalPositions = new Dictionary<RectTransform, Vector3>();
|
||||||
|
OriginalScales = new Dictionary<RectTransform, Vector3>();
|
||||||
|
foreach (var item in comingFromMiddle)
|
||||||
|
{
|
||||||
|
OriginalPositions.Add(item, item.position);
|
||||||
|
OriginalScales.Add(item, item.localScale);
|
||||||
|
}
|
||||||
|
foreach (var item in middleScalingItems)
|
||||||
|
{
|
||||||
|
if(!OriginalPositions.ContainsKey(item)){
|
||||||
|
OriginalPositions.Add(item, item.position);
|
||||||
|
}
|
||||||
|
if(!OriginalScales.ContainsKey(item)){
|
||||||
|
OriginalScales.Add(item, item.localScale);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var item in comingDown)
|
||||||
|
{
|
||||||
|
if(!OriginalPositions.ContainsKey(item)){
|
||||||
|
OriginalPositions.Add(item, item.position);
|
||||||
|
}
|
||||||
|
if(!OriginalScales.ContainsKey(item)){
|
||||||
|
OriginalScales.Add(item, item.localScale);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var item in prizeFrames)
|
||||||
|
{
|
||||||
|
if(!OriginalPositions.ContainsKey(item)){
|
||||||
|
OriginalPositions.Add(item, item.position);
|
||||||
|
}
|
||||||
|
if(!OriginalScales.ContainsKey(item)){
|
||||||
|
OriginalScales.Add(item, item.localScale);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void Hide(){
|
||||||
|
canvasGroup.alpha = 0;
|
||||||
|
canvasGroup.blocksRaycasts = false;
|
||||||
|
canvasGroup.interactable = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void Setup(Team winningTeam, Team myTeam, int redScore, int blueScore){
|
||||||
|
p1_winner.gameObject.SetActive(false);
|
||||||
|
p2_winner.gameObject.SetActive(false);
|
||||||
|
if(myTeam == Team.Red){
|
||||||
|
p1_red.SetActive(true);
|
||||||
|
p1_blue.SetActive(false);
|
||||||
|
p2_red.SetActive(false);
|
||||||
|
p2_blue.SetActive(true);
|
||||||
|
|
||||||
|
p1_icon.sprite = redIcon;
|
||||||
|
p2_icon.sprite = blueIcon;
|
||||||
|
}else{
|
||||||
|
p1_red.SetActive(false);
|
||||||
|
p1_blue.SetActive(true);
|
||||||
|
p2_red.SetActive(true);
|
||||||
|
p2_blue.SetActive(false);
|
||||||
|
|
||||||
|
p1_icon.sprite = blueIcon;
|
||||||
|
p2_icon.sprite = redIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
p1_name.text = LevelLoadManager.myPlayer.Name;
|
||||||
|
p2_name.text = LevelLoadManager.opponentPlayer.Name;
|
||||||
|
p1_l10.text = $"L10 {LevelLoadManager.myPlayer.l10_wins}-{LevelLoadManager.myPlayer.l10_losses}";
|
||||||
|
p2_l10.text = $"L10 {LevelLoadManager.opponentPlayer.l10_wins}-{LevelLoadManager.opponentPlayer.l10_losses}";
|
||||||
|
|
||||||
|
if(myTeam == winningTeam){
|
||||||
|
p1_winner.gameObject.SetActive(true);
|
||||||
|
p2_winner.gameObject.SetActive(false);
|
||||||
|
}else{
|
||||||
|
p1_winner.gameObject.SetActive(false);
|
||||||
|
p2_winner.gameObject.SetActive(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
float rcPrize = 0;
|
||||||
|
public void Show(Team winningTeam, Team myTeam, int redScore, int blueScore){
|
||||||
|
Setup(winningTeam, myTeam, redScore, blueScore);
|
||||||
|
|
||||||
|
canvasGroup.blocksRaycasts = true;
|
||||||
|
canvasGroup.interactable = true;
|
||||||
|
|
||||||
|
foreach (var item in middleScalingItems)
|
||||||
|
{
|
||||||
|
item.localScale = new Vector3(0, item.localScale.y, item.localScale.z);
|
||||||
|
}
|
||||||
|
foreach (var item in comingFromMiddle)
|
||||||
|
{
|
||||||
|
item.position = new Vector3(Screen.width/2f,OriginalPositions[item].y);
|
||||||
|
item.localScale = new Vector3(0, OriginalScales[item].y, OriginalScales[item].z);
|
||||||
|
}
|
||||||
|
foreach (var item in comingDown)
|
||||||
|
{
|
||||||
|
item.position = new Vector3(OriginalPositions[item].x, 0.3f);
|
||||||
|
item.localScale = new Vector3(OriginalScales[item].x, 0, OriginalScales[item].z);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var item in prizeFrames)
|
||||||
|
{
|
||||||
|
item.localScale = new Vector3(0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(winningTeam == myTeam){
|
||||||
|
rcPrize = 8.2f;
|
||||||
|
}
|
||||||
|
|
||||||
|
btnRematch.interactable = winningTeam == myTeam;
|
||||||
|
rematchWarningLoser.SetActive(winningTeam != myTeam);
|
||||||
|
|
||||||
|
StartCoroutine(CoroutineShow());
|
||||||
|
}
|
||||||
|
|
||||||
|
IEnumerator CoroutineShow(){
|
||||||
|
float fadeInTime = 0.5f;
|
||||||
|
float scaleTime = 0.2f;
|
||||||
|
float moveTime = 0.3f;
|
||||||
|
canvasGroup.DOFade(1, fadeInTime).SetEase(Ease.InOutBack);
|
||||||
|
yield return new WaitForSeconds(fadeInTime);
|
||||||
|
|
||||||
|
foreach (var item in middleScalingItems)
|
||||||
|
{
|
||||||
|
item.DOScale(OriginalScales[item], scaleTime).SetEase(Ease.InOutBack);
|
||||||
|
}
|
||||||
|
|
||||||
|
yield return new WaitForSeconds(scaleTime * 0.5f);
|
||||||
|
foreach (var item in comingFromMiddle)
|
||||||
|
{
|
||||||
|
item.DOMove(OriginalPositions[item], moveTime).SetEase(Ease.InOutBack);
|
||||||
|
item.DOScale(OriginalScales[item], scaleTime).SetEase(Ease.InOutBack);
|
||||||
|
}
|
||||||
|
|
||||||
|
yield return new WaitForSeconds(scaleTime * 0.5f);
|
||||||
|
|
||||||
|
foreach (var item in prizeFrames)
|
||||||
|
{
|
||||||
|
item.DOScale(Vector3.one, scaleTime).SetEase(Ease.InOutBack);
|
||||||
|
}
|
||||||
|
|
||||||
|
yield return new WaitForSeconds(scaleTime * 0.5f);
|
||||||
|
|
||||||
|
//Rewards
|
||||||
|
StartCoroutine(CoroutineSetTextNumber(rcPrize, txtRewardRC, 10, "N1", "+", " RC"));
|
||||||
|
StartCoroutine(CoroutineSetTextNumber(100, txtRewardCC, 100, "N0", "+", " CC"));
|
||||||
|
|
||||||
|
yield return new WaitForSeconds(1f);
|
||||||
|
|
||||||
|
foreach (var item in comingDown)
|
||||||
|
{
|
||||||
|
item.DOMove(OriginalPositions[item], 0.3f).SetEase(Ease.InOutBack);
|
||||||
|
item.DOScale(OriginalScales[item], 0.3f).SetEase(Ease.InOutBack);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
StartCoroutine(CoroutineCountdown());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
IEnumerator CoroutineSetTextNumber(float number, TMP_Text text, float speed = 100f, string formatting = "N0", string prefix = "", string suffix = ""){
|
||||||
|
float t=0;
|
||||||
|
while(t < number){
|
||||||
|
t+=Time.deltaTime*speed;
|
||||||
|
text.text = prefix + t.ToString(formatting) + suffix;
|
||||||
|
yield return null;
|
||||||
|
}
|
||||||
|
text.text = prefix + number.ToString(formatting) + suffix;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
IEnumerator CoroutineCountdown(){
|
||||||
|
TextColorFlash textColorFlash = countdownTxt.GetComponent<TextColorFlash>();
|
||||||
|
while(returnToMenuCountdown > 0){
|
||||||
|
returnToMenuCountdown--;
|
||||||
|
countdownTxt.text = returningToMenuText.Replace("{t}", returnToMenuCountdown.ToString("N0"));
|
||||||
|
if(returnToMenuCountdown < 5){
|
||||||
|
textColorFlash.duration = 5;
|
||||||
|
}
|
||||||
|
yield return new WaitForSecondsRealtime(1f);
|
||||||
|
}
|
||||||
|
|
||||||
|
LevelLoadManager.LoadLevel("MainMenu");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 34fb5f6c8224c94438e92e0f8f5c8471
|
||||||
@@ -38,6 +38,10 @@ public class MainMenuManager : MonoBehaviour
|
|||||||
public TMP_Text txtWithdrawStatus;
|
public TMP_Text txtWithdrawStatus;
|
||||||
private bool isCoinBuyInProgress;
|
private bool isCoinBuyInProgress;
|
||||||
|
|
||||||
|
[Header("Audio")]
|
||||||
|
public ToggleButton toggleSfx;
|
||||||
|
public ToggleButton toggleMusic;
|
||||||
|
|
||||||
void Awake()
|
void Awake()
|
||||||
{
|
{
|
||||||
if(LoginManager.instance==null){
|
if(LoginManager.instance==null){
|
||||||
@@ -82,6 +86,28 @@ public class MainMenuManager : MonoBehaviour
|
|||||||
btnPaste.onClick.AddListener(OnPasteFromClipboard);
|
btnPaste.onClick.AddListener(OnPasteFromClipboard);
|
||||||
|
|
||||||
btnPlay.onClick.AddListener(OnPlay);
|
btnPlay.onClick.AddListener(OnPlay);
|
||||||
|
|
||||||
|
toggleSfx.onToggleValueChanged.AddListener(OnToggleSfx);
|
||||||
|
toggleMusic.onToggleValueChanged.AddListener(OnToggleMusic);
|
||||||
|
|
||||||
|
toggleSfx.SetIsOn(AudioManager.instance.IsSFXOn());
|
||||||
|
toggleMusic.SetIsOn(AudioManager.instance.IsMusicOn());
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnDestroy(){
|
||||||
|
LoginManager.OnUserDataUpdated -= OnUserUpdated;
|
||||||
|
toggleSfx.onToggleValueChanged.RemoveListener(OnToggleSfx);
|
||||||
|
toggleMusic.onToggleValueChanged.RemoveListener(OnToggleMusic);
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnToggleSfx(bool isOn)
|
||||||
|
{
|
||||||
|
AudioManager.instance.SetSfxVolume(isOn ? 1f : 0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnToggleMusic(bool isOn)
|
||||||
|
{
|
||||||
|
AudioManager.instance.SetMusicVolume(isOn ? 1f : 0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnPlay()
|
void OnPlay()
|
||||||
@@ -174,10 +200,7 @@ public class MainMenuManager : MonoBehaviour
|
|||||||
btnBuyUsd50.interactable = interactable;
|
btnBuyUsd50.interactable = interactable;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnDestroy()
|
|
||||||
{
|
|
||||||
LoginManager.OnUserDataUpdated -= OnUserUpdated;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
void Update()
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ using UnityEngine.SceneManagement;
|
|||||||
|
|
||||||
public class AudioManager : MonoBehaviour
|
public class AudioManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
const string SfxEnabledPrefsKey = "Audio.SfxEnabled";
|
||||||
|
const string MusicEnabledPrefsKey = "Audio.MusicEnabled";
|
||||||
|
|
||||||
[Header("Sources")]
|
[Header("Sources")]
|
||||||
public AudioSource musicSource;
|
public AudioSource musicSource;
|
||||||
public AudioSource uiSfxSource;
|
public AudioSource uiSfxSource;
|
||||||
@@ -44,6 +47,7 @@ public class AudioManager : MonoBehaviour
|
|||||||
instance = this;
|
instance = this;
|
||||||
DontDestroyOnLoad(gameObject);
|
DontDestroyOnLoad(gameObject);
|
||||||
_maxMusicVolume = musicSource != null ? musicSource.volume : 1f;
|
_maxMusicVolume = musicSource != null ? musicSource.volume : 1f;
|
||||||
|
LoadAudioPrefs();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnEnable()
|
void OnEnable()
|
||||||
@@ -227,6 +231,82 @@ public class AudioManager : MonoBehaviour
|
|||||||
|
|
||||||
#region SFX
|
#region SFX
|
||||||
|
|
||||||
|
void LoadAudioPrefs()
|
||||||
|
{
|
||||||
|
ToggleSFX(PlayerPrefs.GetInt(SfxEnabledPrefsKey, 1) == 1, savePreference: false);
|
||||||
|
ToggleMusic(PlayerPrefs.GetInt(MusicEnabledPrefsKey, 1) == 1, savePreference: false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ToggleSFX(bool isOn)
|
||||||
|
{
|
||||||
|
ToggleSFX(isOn, savePreference: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ToggleMusic(bool isOn)
|
||||||
|
{
|
||||||
|
ToggleMusic(isOn, savePreference: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsSFXOn()
|
||||||
|
{
|
||||||
|
if (uiSfxSource != null)
|
||||||
|
return !uiSfxSource.mute;
|
||||||
|
if (gameSfxSource != null)
|
||||||
|
return !gameSfxSource.mute;
|
||||||
|
if (crowdSfxSourceA != null)
|
||||||
|
return !crowdSfxSourceA.mute;
|
||||||
|
if (crowdSfxSourceB != null)
|
||||||
|
return !crowdSfxSourceB.mute;
|
||||||
|
return PlayerPrefs.GetInt(SfxEnabledPrefsKey, 1) == 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsMusicOn()
|
||||||
|
{
|
||||||
|
if (musicSource != null)
|
||||||
|
return !musicSource.mute;
|
||||||
|
return PlayerPrefs.GetInt(MusicEnabledPrefsKey, 1) == 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetSfxVolume(float volume)
|
||||||
|
{
|
||||||
|
ToggleSFX(volume > 0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetMusicVolume(float volume)
|
||||||
|
{
|
||||||
|
ToggleMusic(volume > 0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ToggleSFX(bool isOn, bool savePreference)
|
||||||
|
{
|
||||||
|
if (uiSfxSource != null)
|
||||||
|
uiSfxSource.mute = !isOn;
|
||||||
|
if (gameSfxSource != null)
|
||||||
|
gameSfxSource.mute = !isOn;
|
||||||
|
if (crowdSfxSourceA != null)
|
||||||
|
crowdSfxSourceA.mute = !isOn;
|
||||||
|
if (crowdSfxSourceB != null)
|
||||||
|
crowdSfxSourceB.mute = !isOn;
|
||||||
|
|
||||||
|
if (!savePreference)
|
||||||
|
return;
|
||||||
|
|
||||||
|
PlayerPrefs.SetInt(SfxEnabledPrefsKey, isOn ? 1 : 0);
|
||||||
|
PlayerPrefs.Save();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ToggleMusic(bool isOn, bool savePreference)
|
||||||
|
{
|
||||||
|
if (musicSource != null)
|
||||||
|
musicSource.mute = !isOn;
|
||||||
|
|
||||||
|
if (!savePreference)
|
||||||
|
return;
|
||||||
|
|
||||||
|
PlayerPrefs.SetInt(MusicEnabledPrefsKey, isOn ? 1 : 0);
|
||||||
|
PlayerPrefs.Save();
|
||||||
|
}
|
||||||
|
|
||||||
public void PlayWallHit(float vol=1){
|
public void PlayWallHit(float vol=1){
|
||||||
gameSfxSource.PlayOneShot(audioDirectory.wallHits[Random.Range(0, audioDirectory.wallHits.Length)], vol);
|
gameSfxSource.PlayOneShot(audioDirectory.wallHits[Random.Range(0, audioDirectory.wallHits.Length)], vol);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
using DG.Tweening;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
using TMPro;
|
||||||
|
[RequireComponent(typeof(TMP_Text))]
|
||||||
|
public class TextBlinker : MonoBehaviour
|
||||||
|
{
|
||||||
|
public float duration = 0.5f;
|
||||||
|
public Ease ease = Ease.InOutSine;
|
||||||
|
public float from = 0f;
|
||||||
|
public float to = 1f;
|
||||||
|
public int loops = -1;
|
||||||
|
public LoopType loopType = LoopType.Yoyo;
|
||||||
|
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
var txt = GetComponent<TMP_Text>();
|
||||||
|
var c = txt.color;
|
||||||
|
c.a = from;
|
||||||
|
txt.color = c;
|
||||||
|
txt.DOFade(to, duration).SetEase(ease).SetLoops(loops, loopType);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 430ada29524e05f41b887541b79adc2c
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
using TMPro;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
|
||||||
|
[RequireComponent(typeof(TMP_Text))]
|
||||||
|
public class TextColorFlash : MonoBehaviour
|
||||||
|
{
|
||||||
|
public Color colorA = Color.white;
|
||||||
|
public Color colorB = Color.red;
|
||||||
|
public float duration = 1f;
|
||||||
|
|
||||||
|
float a =0;
|
||||||
|
public float t;
|
||||||
|
TMP_Text txt;
|
||||||
|
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
txt = GetComponent<TMP_Text>();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
if(duration <= 0){return;}
|
||||||
|
float sinA = Mathf.Sin(a);
|
||||||
|
t = sinA * 0.5f + 0.5f;
|
||||||
|
Color color = Color.Lerp(colorA, colorB, t);
|
||||||
|
txt.color = color;
|
||||||
|
a += Time.deltaTime * duration;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0d2075bb87ea2e44ebc4a00fcdac4ff2
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.Events;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
[RequireComponent(typeof(Button))]
|
||||||
|
public class ToggleButton : MonoBehaviour
|
||||||
|
{
|
||||||
|
[SerializeField]
|
||||||
|
public ToggleSpriteData[] toggleSpriteData;
|
||||||
|
|
||||||
|
public bool isOn = false;
|
||||||
|
|
||||||
|
Button btn;
|
||||||
|
|
||||||
|
public UnityEvent<bool> onToggleValueChanged = new UnityEvent<bool>();
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
btn = GetComponent<Button>();
|
||||||
|
btn.onClick.AddListener(OnClick);
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnClick()
|
||||||
|
{
|
||||||
|
SetIsOn(!isOn);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetIsOn(bool isOn)
|
||||||
|
{
|
||||||
|
this.isOn = isOn;
|
||||||
|
foreach (var spriteData in toggleSpriteData)
|
||||||
|
{
|
||||||
|
spriteData.target.sprite = isOn ? spriteData.onSprite : spriteData.offSprite;
|
||||||
|
}
|
||||||
|
onToggleValueChanged.Invoke(isOn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class ToggleSpriteData{
|
||||||
|
public Image target;
|
||||||
|
public Sprite onSprite;
|
||||||
|
public Sprite offSprite;
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 32dd41e420d0032409b03beba9058456
|
||||||
@@ -141,7 +141,7 @@ PlayerSettings:
|
|||||||
loadStoreDebugModeEnabled: 0
|
loadStoreDebugModeEnabled: 0
|
||||||
visionOSBundleVersion: 1.0
|
visionOSBundleVersion: 1.0
|
||||||
tvOSBundleVersion: 1.0
|
tvOSBundleVersion: 1.0
|
||||||
bundleVersion: 0.99.1
|
bundleVersion: 1.0
|
||||||
preloadedAssets:
|
preloadedAssets:
|
||||||
- {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3}
|
- {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3}
|
||||||
metroInputSource: 0
|
metroInputSource: 0
|
||||||
|
|||||||
Reference in New Issue
Block a user