practice mode
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
+39
-97
@@ -1,98 +1,40 @@
|
||||
Logger initiated at 6/2/2026 2:22:58 PM
|
||||
Logger initiated at 7/2/2026 11:37:45 AM
|
||||
|
||||
[6/2/2026 2:22:58 PM] Cupid settings updated
|
||||
[6/2/2026 2:22:58 PM] Cupid settings updated
|
||||
[6/2/2026 2:22:59 PM] Starting matchmake as warlock2
|
||||
[6/2/2026 2:23:02 PM] Still waiting: {"ok":true,"entry_fee":21,"rc_prize":34,"for_red":{"Players":[{"Name":"warlock","LastSeen":1780390382670,"UserId":2,"l10_wins":3,"l10_losses":2}],"GameName":"soccar","Port":26544,"InitTime":1780390382670,"entry_fee":21,"match_id":148,"rc_prize":34,"your_team":"red"},"for_blue":null}
|
||||
[6/2/2026 2:23:03 PM] Got into a room
|
||||
[6/2/2026 2:23:03 PM] {"ok":true,"entry_fee":21,"rc_prize":34,"for_red":{"Players":[{"Name":"warlock","LastSeen":1780390382670,"UserId":2,"l10_wins":3,"l10_losses":2},{"Name":"warlock2","LastSeen":1780390383139,"UserId":3,"l10_wins":3,"l10_losses":3}],"GameName":"soccar","Port":26544,"InitTime":1780390382670,"entry_fee":21,"match_id":148,"instance_started":true,"rc_prize":34,"your_team":"red"},"for_blue":{"Players":[{"Name":"warlock","LastSeen":1780390382670,"UserId":2,"l10_wins":3,"l10_losses":2},{"Name":"warlock2","LastSeen":1780390383139,"UserId":3,"l10_wins":3,"l10_losses":3}],"GameName":"soccar","Port":26544,"InitTime":1780390382670,"entry_fee":21,"match_id":148,"instance_started":true,"rc_prize":34,"your_team":"blue"}}
|
||||
[6/2/2026 2:23:03 PM] Configured dedicated match reporting for match id 148 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base https://kickkingsapi.playpoolstudios.com
|
||||
[6/2/2026 2:23:03 PM] Setting cupid to load game scene
|
||||
[6/2/2026 2:23:03 PM] Loading game scene
|
||||
[6/2/2026 2:23:04 PM] Got into a room
|
||||
[6/2/2026 2:23:04 PM] {"ok":true,"entry_fee":21,"rc_prize":34,"for_red":{"Players":[{"Name":"warlock","LastSeen":1780390384353,"UserId":2,"l10_wins":3,"l10_losses":2},{"Name":"warlock2","LastSeen":1780390383139,"UserId":3,"l10_wins":3,"l10_losses":3}],"GameName":"soccar","Port":26544,"InitTime":1780390382670,"entry_fee":21,"match_id":148,"instance_started":true,"rc_prize":34,"your_team":"red"},"for_blue":{"Players":[{"Name":"warlock","LastSeen":1780390384353,"UserId":2,"l10_wins":3,"l10_losses":2},{"Name":"warlock2","LastSeen":1780390383139,"UserId":3,"l10_wins":3,"l10_losses":3}],"GameName":"soccar","Port":26544,"InitTime":1780390382670,"entry_fee":21,"match_id":148,"instance_started":true,"rc_prize":34,"your_team":"blue"}}
|
||||
[6/2/2026 2:23:04 PM] Configured dedicated match reporting for match id 148 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base https://kickkingsapi.playpoolstudios.com
|
||||
[6/2/2026 2:23:04 PM] Setting cupid to load game scene
|
||||
[6/2/2026 2:23:04 PM] Loading game scene
|
||||
[6/2/2026 2:23:08 PM] Starting client at $kickkingsapi.playpoolstudios.com:26544
|
||||
[6/2/2026 2:23:08 PM] Client connected
|
||||
[6/2/2026 2:23:09 PM] Starting client at $kickkingsapi.playpoolstudios.com:26544
|
||||
[6/2/2026 2:23:09 PM] Client connected
|
||||
[6/2/2026 2:23:17 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:23:17 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:23:32 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:23:32 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:23:47 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:23:47 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:24:02 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:24:02 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:24:17 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:24:17 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:24:32 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:24:33 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:24:48 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:24:48 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:25:03 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:25:03 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:25:18 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:25:18 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:25:33 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:25:33 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:25:48 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:25:48 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:26:03 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:26:03 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:26:18 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:26:19 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:26:34 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:26:34 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:26:49 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:26:49 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:27:04 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:27:04 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:27:19 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:27:19 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:27:34 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:27:34 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:27:49 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:27:49 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:28:05 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:28:05 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:28:20 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:28:20 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:28:35 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:28:35 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:28:50 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:28:50 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:29:05 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:29:05 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:29:20 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:29:20 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:29:35 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:29:35 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:29:51 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:29:51 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:30:06 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:30:06 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:30:21 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:30:21 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:30:36 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:30:36 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:30:51 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:30:51 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:31:06 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:31:06 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:31:21 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:31:22 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:31:37 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:31:37 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:31:52 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:31:52 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:32:07 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:32:07 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:32:22 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:32:22 PM] Selected team changed from Red to Blue
|
||||
[6/2/2026 2:32:37 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:32:37 PM] Selected team changed from Blue to Red
|
||||
[6/2/2026 2:32:40 PM] Client disconnected
|
||||
[6/2/2026 2:32:44 PM] Client disconnected
|
||||
[7/2/2026 11:37:45 AM] Cupid settings updated
|
||||
[7/2/2026 11:37:46 AM] Cupid settings updated
|
||||
[7/2/2026 11:37:48 AM] Configured dedicated match reporting for match id 0 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base https://kickkingsapi.playpoolstudios.com
|
||||
[7/2/2026 11:37:52 AM] Invalid Room port
|
||||
[7/2/2026 11:37:53 AM] Mirror server exception logging enabled
|
||||
[7/2/2026 11:37:53 AM] Game started On localhost, tutorial mode enabled
|
||||
[7/2/2026 11:37:53 AM] Client connected
|
||||
[7/2/2026 11:37:53 AM] Selected team changed from Red to Blue
|
||||
[7/2/2026 11:37:56 AM] force = 70 * 0.4389894 = 30.72926
|
||||
[7/2/2026 11:37:56 AM] launching puck at (1.26, 0.44) with (-38.67, -13.55) force
|
||||
[7/2/2026 11:37:58 AM] Selected team changed from Blue to Red
|
||||
[7/2/2026 11:38:01 AM] AI best puck Puck: total=3.19 (prox=0.85, between=0.03, traj=0.78, push=1.00)
|
||||
[7/2/2026 11:38:01 AM] force = 70 * 0.9010412 = 63.07288
|
||||
[7/2/2026 11:38:01 AM] launching puck at (0.00, -4.00) with (0.00, 252.29) force
|
||||
[7/2/2026 11:38:02 AM] Score changed from 0 to 1
|
||||
[7/2/2026 11:38:02 AM] Red goal scored, red score is now 1
|
||||
[7/2/2026 11:38:05 AM] Selected team changed from Red to Blue
|
||||
[7/2/2026 11:38:07 AM] force = 70 * 0.654063 = 45.78441
|
||||
[7/2/2026 11:38:07 AM] launching puck at (1.99, 1.14) with (-90.94, -52.30) force
|
||||
[7/2/2026 11:38:09 AM] Selected team changed from Blue to Red
|
||||
[7/2/2026 11:38:12 AM] AI best puck Puck: total=3.19 (prox=0.85, between=0.03, traj=0.78, push=1.00)
|
||||
[7/2/2026 11:38:12 AM] force = 70 * 0.9010412 = 63.07288
|
||||
[7/2/2026 11:38:12 AM] launching puck at (0.00, -4.00) with (-0.03, 252.29) force
|
||||
[7/2/2026 11:38:13 AM] Score changed from 1 to 2
|
||||
[7/2/2026 11:38:13 AM] Red goal scored, red score is now 2
|
||||
[7/2/2026 11:38:16 AM] Selected team changed from Red to Blue
|
||||
[7/2/2026 11:38:17 AM] force = 70 * 0.8018283 = 56.12798
|
||||
[7/2/2026 11:38:17 AM] launching puck at (2.69, 1.69) with (-150.74, -94.69) force
|
||||
[7/2/2026 11:38:19 AM] Selected team changed from Blue to Red
|
||||
[7/2/2026 11:38:22 AM] AI best puck Puck: total=3.19 (prox=0.85, between=0.03, traj=0.78, push=1.00)
|
||||
[7/2/2026 11:38:22 AM] force = 70 * 0.9010412 = 63.07288
|
||||
[7/2/2026 11:38:22 AM] launching puck at (0.00, -4.00) with (0.00, 252.29) force
|
||||
[7/2/2026 11:38:23 AM] Score changed from 2 to 3
|
||||
[7/2/2026 11:38:23 AM] Red goal scored, red score is now 3
|
||||
[7/2/2026 11:38:34 AM] Mirror server: client disconnected (connId=0)
|
||||
[7/2/2026 11:38:34 AM] Client disconnected
|
||||
[7/2/2026 11:38:40 AM] Cupid settings updated
|
||||
[7/2/2026 11:38:42 AM] Cupid settings updated
|
||||
|
||||
+132
-2
@@ -4281,6 +4281,88 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 223978210}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &228360401
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 228360403}
|
||||
- component: {fileID: 228360402}
|
||||
- component: {fileID: 228360404}
|
||||
m_Layer: 0
|
||||
m_Name: AiBotController
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &228360402
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 228360401}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c886581a7bac8f34ba8f7995eb48db02, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
syncDirection: 0
|
||||
syncMode: 0
|
||||
syncInterval: 0
|
||||
isEnabled: 0
|
||||
aiTeam: 0
|
||||
aiPucks: []
|
||||
aiTurnDelay: 0.35
|
||||
trajectoryPreviewDuration: 0.5
|
||||
puckCastDurationRatio: 0.4
|
||||
trajectorySimMaxTime: 3
|
||||
puckTrajectoryColor: {r: 1, g: 0, b: 0.13618708, a: 0.9}
|
||||
ballTrajectoryColor: {r: 0.9, g: 0.95, b: 1, a: 0.9}
|
||||
trajectoryLineWidth: 0.08
|
||||
trajectorySortingOrder: 30
|
||||
ballProximityWeight: 1
|
||||
ballBetweenGoalWeight: 1.5
|
||||
trajectoryGoalWeight: 2
|
||||
obstaclePushWeight: 0.75
|
||||
obstacleNearBallDistance: 2
|
||||
ownGoalDangerDistance: 3.5
|
||||
--- !u!4 &228360403
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 228360401}
|
||||
serializedVersion: 2
|
||||
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: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &228360404
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 228360401}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9b91ecbcc199f4492b9a91e820070131, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
sceneId: 4079853588
|
||||
_assetId: 0
|
||||
serverOnly: 0
|
||||
visibility: 0
|
||||
hasSpawned: 0
|
||||
--- !u!1 &235344147
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -4339,7 +4421,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 0141b420cef50bf4781442dc4dda275a, type: 3}
|
||||
m_Sprite: {fileID: 21300000, guid: 7b4541dccf68a5a479d7bc41c620fae2, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
@@ -4554,7 +4636,7 @@ MonoBehaviour:
|
||||
preview: 0
|
||||
isPlaying: 1
|
||||
loop: 1
|
||||
currentFrame: 56
|
||||
currentFrame: 89
|
||||
--- !u!1 &239916595
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -9117,6 +9199,52 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 644301953}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &652368658
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 652368659}
|
||||
- component: {fileID: 652368660}
|
||||
m_Layer: 0
|
||||
m_Name: TutorialManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &652368659
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 652368658}
|
||||
serializedVersion: 2
|
||||
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: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &652368660
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 652368658}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 304204825fc486545a7a9bd7dd232861, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
isTutorial: 0
|
||||
aiController: {fileID: 228360402}
|
||||
--- !u!1 &662397534
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -26762,3 +26890,5 @@ SceneRoots:
|
||||
- {fileID: 197838135}
|
||||
- {fileID: 1580578685}
|
||||
- {fileID: 1698395129}
|
||||
- {fileID: 652368659}
|
||||
- {fileID: 228360403}
|
||||
|
||||
@@ -4272,9 +4272,11 @@ MonoBehaviour:
|
||||
dummyBuyScreen: {fileID: 728846721}
|
||||
withdrawalScreen: {fileID: 484954850}
|
||||
btnPlay: {fileID: 1825499016338738107}
|
||||
btnTutorial: {fileID: 1504368867}
|
||||
rcPlayText: {fileID: 1485732205}
|
||||
entryFeeTxt: {fileID: 2074209872}
|
||||
rcPrizeTxt: {fileID: 1745030399}
|
||||
tutorialGameScene: Game
|
||||
btnBuyUsd5: {fileID: 1725071167}
|
||||
btnBuyUsd20: {fileID: 215556028}
|
||||
btnBuyUsd50: {fileID: 1025220152}
|
||||
@@ -10764,6 +10766,169 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1496022817}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1504368866
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1504368872}
|
||||
- component: {fileID: 1504368871}
|
||||
- component: {fileID: 1504368868}
|
||||
- component: {fileID: 1504368867}
|
||||
- component: {fileID: 1504368870}
|
||||
- component: {fileID: 1504368869}
|
||||
m_Layer: 5
|
||||
m_Name: btnPractice
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1504368867
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1504368866}
|
||||
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: 1504368868}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 656934058}
|
||||
m_TargetAssemblyTypeName: MainMenuManager, Assembly-CSharp
|
||||
m_MethodName: ShowGameModesScreen
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!114 &1504368868
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1504368866}
|
||||
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.9811321, g: 0.9811321, b: 0.9811321, 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: 2bc701b63b63f40e0893a9fabeaa0a78, 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!114 &1504368869
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1504368866}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e4c65221cd965e45853c892a9facd82, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
scaleFactor: 1.05
|
||||
duration: 0.1
|
||||
ease: 31
|
||||
--- !u!114 &1504368870
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1504368866}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Delegates: []
|
||||
--- !u!222 &1504368871
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1504368866}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!224 &1504368872
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1504368866}
|
||||
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: 1741298398}
|
||||
m_Father: {fileID: 1685636767}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 1}
|
||||
m_AnchorMax: {x: 0.5, y: 1}
|
||||
m_AnchoredPosition: {x: -0.000026703, y: -1222}
|
||||
m_SizeDelta: {x: 450.12, y: 274.7041}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &1530696436
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -11465,6 +11630,7 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1825499014647108682}
|
||||
- {fileID: 1504368872}
|
||||
- {fileID: 1968012966}
|
||||
m_Father: {fileID: 608674245}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -12416,6 +12582,142 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1740418349}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1741298397
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1741298398}
|
||||
- component: {fileID: 1741298400}
|
||||
- component: {fileID: 1741298399}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1741298398
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1741298397}
|
||||
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: 1504368872}
|
||||
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: 0, y: 7.95}
|
||||
m_SizeDelta: {x: 357.02728, y: 122.91243}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1741298399
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1741298397}
|
||||
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: Practice
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 893d86ab7286e5d4383d1c3f2ecdb510, type: 2}
|
||||
m_sharedMaterial: {fileID: -5214663084478877120, guid: 893d86ab7286e5d4383d1c3f2ecdb510, 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: 68.38
|
||||
m_fontSizeBase: 68.38
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 54
|
||||
m_fontStyle: 0
|
||||
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_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 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!222 &1741298400
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1741298397}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1745030397
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c886581a7bac8f34ba8f7995eb48db02
|
||||
@@ -489,7 +489,7 @@ public class GameManager : NetworkBehaviour
|
||||
SwitchTeams();
|
||||
}
|
||||
|
||||
void SwitchTeams(){
|
||||
public void SwitchTeams(){
|
||||
if(!isServer){
|
||||
Debug.LogWarning("SwitchTeams called on client, skipping");
|
||||
return;
|
||||
@@ -555,7 +555,11 @@ public class GameManager : NetworkBehaviour
|
||||
HandleTurnTimer();
|
||||
|
||||
if(!gameStarted){
|
||||
|
||||
if(GameTutorialManager.tutorialModeEnabled){
|
||||
gameStarted = true;
|
||||
GameCanvas.instance.HideWaitingForOpponentPanel();
|
||||
Logger.Log("Game started On localhost, tutorial mode enabled");
|
||||
}
|
||||
NetPlayer[] players = FindObjectsOfType<NetPlayer>();
|
||||
#if UNITY_EDITOR
|
||||
if(Input.GetKeyDown(KeyCode.Space)){
|
||||
|
||||
@@ -411,9 +411,13 @@ public class GameOverCanvas : MonoBehaviour
|
||||
item.localScale = new Vector3(0, 0, 0);
|
||||
}
|
||||
|
||||
if(winningTeam == myTeam){
|
||||
if (GameTutorialManager.tutorialModeEnabled)
|
||||
rcPrize = 0;
|
||||
else if (winningTeam == myTeam)
|
||||
rcPrize = CoinHelper.Format(GameManager.MatchRcPrizeCoins);
|
||||
}
|
||||
|
||||
if (btnRematch != null)
|
||||
btnRematch.gameObject.SetActive(!GameTutorialManager.tutorialModeEnabled);
|
||||
|
||||
UpdateRematchAvailability();
|
||||
ApplyRcBalancesToUi(null);
|
||||
@@ -452,10 +456,13 @@ public class GameOverCanvas : MonoBehaviour
|
||||
yield return new WaitForSeconds(scaleTime * 0.5f);
|
||||
|
||||
//Rewards
|
||||
float ccReward = GameTutorialManager.tutorialModeEnabled ? 0f : 100f;
|
||||
StartCoroutine(CoroutineSetTextNumber(rcPrize, txtRewardRC, 10, "N1", "+", " RC"));
|
||||
StartCoroutine(CoroutineSetTextNumber(100, txtRewardCC, 100, "N0", "+", " CC"));
|
||||
StartCoroutine(CoroutineSetTextNumber(ccReward, txtRewardCC, 100, "N0", "+", " CC"));
|
||||
|
||||
txtBetRC.text = CoinHelper.FormatString(GameManager.MatchRcPrizeCoins) + " RC";
|
||||
txtBetRC.text = GameTutorialManager.tutorialModeEnabled
|
||||
? "0 RC"
|
||||
: CoinHelper.FormatString(GameManager.MatchRcPrizeCoins) + " RC";
|
||||
|
||||
yield return new WaitForSeconds(1f);
|
||||
|
||||
@@ -586,6 +593,14 @@ public class GameOverCanvas : MonoBehaviour
|
||||
|
||||
void UpdateRematchAvailability()
|
||||
{
|
||||
if (GameTutorialManager.tutorialModeEnabled)
|
||||
{
|
||||
btnRematch.interactable = false;
|
||||
if (rematchWarningLoser != null)
|
||||
rematchWarningLoser.text = "";
|
||||
return;
|
||||
}
|
||||
|
||||
if (winningTeam == myTeam)
|
||||
{
|
||||
btnRematch.interactable = false;
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Mirror;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
|
||||
public class GameTutorialManager : MonoBehaviour
|
||||
{
|
||||
public const string CpuOpponentName = "CPU";
|
||||
public const string DefaultGameSceneName = "Game";
|
||||
|
||||
public static bool tutorialModeTrigger = false;
|
||||
public bool isTutorial = false;
|
||||
public static bool tutorialModeEnabled = false;
|
||||
|
||||
public AiBotController aiController;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
tutorialModeEnabled = false;
|
||||
if (isTutorial)
|
||||
tutorialModeTrigger = true;
|
||||
|
||||
if (tutorialModeTrigger)
|
||||
tutorialModeEnabled = true;
|
||||
|
||||
tutorialModeTrigger = false;
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
if (tutorialModeEnabled)
|
||||
tutorialModeEnabled = false;
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
if (tutorialModeEnabled)
|
||||
{
|
||||
NetworkManager.singleton.networkAddress = "localhost";
|
||||
NetworkManager.singleton.StartHost();
|
||||
|
||||
StartCoroutine(SetupAiWhenReady());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Call from the main menu before loading the game scene.</summary>
|
||||
public static void PrepareLaunch(MatchmadePlayer myPlayer, MatchmadePlayer cpuPlayer, Team myTeam = Team.Red)
|
||||
{
|
||||
LoginManager.ClearMatchYourTeam();
|
||||
GameManager.MyTeam = myTeam;
|
||||
GameManager.MatchRcPrizeCoins = 0;
|
||||
GameManager.ConfigureDedicatedMatchReporting(0);
|
||||
|
||||
if (myTeam == Team.Red)
|
||||
{
|
||||
GameManager.RedPlayer = myPlayer;
|
||||
GameManager.BluePlayer = cpuPlayer;
|
||||
}
|
||||
else
|
||||
{
|
||||
GameManager.RedPlayer = cpuPlayer;
|
||||
GameManager.BluePlayer = myPlayer;
|
||||
}
|
||||
|
||||
LevelLoadManager.myPlayer = myPlayer;
|
||||
LevelLoadManager.opponentPlayer = cpuPlayer;
|
||||
if (LevelLoadManager.instance != null)
|
||||
LevelLoadManager.instance.SetupMatchMade(myTeam, myPlayer, cpuPlayer, "0 RC");
|
||||
|
||||
tutorialModeTrigger = true;
|
||||
}
|
||||
|
||||
public static MatchmadePlayer CreateCpuOpponent()
|
||||
{
|
||||
return new MatchmadePlayer
|
||||
{
|
||||
Name = CpuOpponentName,
|
||||
l10_wins = 10,
|
||||
l10_losses = 0
|
||||
};
|
||||
}
|
||||
|
||||
public static MatchmadePlayer CreateMyPlayerFromUser(UserData user)
|
||||
{
|
||||
return new MatchmadePlayer
|
||||
{
|
||||
Name = user.username,
|
||||
UserId = user.id,
|
||||
rc = user.rc
|
||||
};
|
||||
}
|
||||
|
||||
public static IEnumerator CoFetchPlayerL10(MatchmadePlayer player)
|
||||
{
|
||||
if (player == null || player.UserId <= 0)
|
||||
yield break;
|
||||
|
||||
string baseUrl = (GameManager.DedicatedInternalApiBase ?? LoginManager.AuthBaseUrl ?? "").TrimEnd('/');
|
||||
if (string.IsNullOrEmpty(baseUrl))
|
||||
yield break;
|
||||
|
||||
string url = baseUrl + "/players/" + player.UserId + "/l10";
|
||||
using (var req = UnityWebRequest.Get(url))
|
||||
{
|
||||
yield return req.SendWebRequest();
|
||||
if (req.result != UnityWebRequest.Result.Success)
|
||||
{
|
||||
Logger.Log("Tutorial L10 fetch failed: " + req.error + " " + url);
|
||||
yield break;
|
||||
}
|
||||
|
||||
var resp = JsonUtility.FromJson<PlayerL10Response>(req.downloadHandler.text);
|
||||
if (resp != null && resp.ok)
|
||||
{
|
||||
player.l10_wins = resp.l10_wins;
|
||||
player.l10_losses = resp.l10_losses;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
class PlayerL10Response
|
||||
{
|
||||
public bool ok;
|
||||
public int player_id;
|
||||
public int l10_wins;
|
||||
public int l10_losses;
|
||||
}
|
||||
|
||||
IEnumerator SetupAiWhenReady()
|
||||
{
|
||||
float timeout = 5f;
|
||||
while (NetPlayer.localPlayer == null && timeout > 0f)
|
||||
{
|
||||
timeout -= Time.deltaTime;
|
||||
yield return null;
|
||||
}
|
||||
|
||||
Team playerTeam = NetPlayer.localPlayer != null
|
||||
? NetPlayer.localPlayer.myTeam
|
||||
: GameManager.MyTeam;
|
||||
Team opponentTeam = playerTeam == Team.Red ? Team.Blue : Team.Red;
|
||||
|
||||
if (GameManager.instance.SelectedTeam != playerTeam)
|
||||
GameManager.instance.SwitchTeams();
|
||||
|
||||
aiController.Setup(opponentTeam);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 304204825fc486545a7a9bd7dd232861
|
||||
@@ -4,6 +4,19 @@ using UnityEngine;
|
||||
public class Goal : NetworkBehaviour
|
||||
{
|
||||
public Team team;
|
||||
|
||||
public static Goal RedGoal,BlueGoal;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
if(team == Team.Red){
|
||||
RedGoal = this;
|
||||
}else{
|
||||
BlueGoal = this;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void OnTriggerEnter2D(Collider2D collision)
|
||||
{
|
||||
if(!isServer){return;}
|
||||
|
||||
@@ -27,9 +27,11 @@ public class MainMenuManager : MonoBehaviour
|
||||
public GameObject withdrawalScreen;
|
||||
[Header("Play")]
|
||||
public Button btnPlay;
|
||||
public Button btnTutorial;
|
||||
public TMP_Text rcPlayText;
|
||||
public TMP_Text entryFeeTxt;
|
||||
public TMP_Text rcPrizeTxt;
|
||||
[SerializeField] string tutorialGameScene = GameTutorialManager.DefaultGameSceneName;
|
||||
|
||||
[Header("Dummy Buy")]
|
||||
public Button btnBuyUsd5;
|
||||
@@ -99,6 +101,8 @@ public class MainMenuManager : MonoBehaviour
|
||||
btnPaste.onClick.AddListener(OnPasteFromClipboard);
|
||||
|
||||
btnPlay.onClick.AddListener(OnPlay);
|
||||
if (btnTutorial != null && btnTutorial != btnPlay)
|
||||
btnTutorial.onClick.AddListener(OnPlayTutorial);
|
||||
|
||||
toggleSfx.onToggleValueChanged.AddListener(OnToggleSfx);
|
||||
toggleMusic.onToggleValueChanged.AddListener(OnToggleMusic);
|
||||
@@ -114,6 +118,8 @@ public class MainMenuManager : MonoBehaviour
|
||||
LoginManager.OnUserDataUpdated -= OnUserUpdated;
|
||||
toggleSfx.onToggleValueChanged.RemoveListener(OnToggleSfx);
|
||||
toggleMusic.onToggleValueChanged.RemoveListener(OnToggleMusic);
|
||||
if (btnTutorial != null && btnTutorial != btnPlay)
|
||||
btnTutorial.onClick.RemoveListener(OnPlayTutorial);
|
||||
}
|
||||
|
||||
void OnToggleSfx(bool isOn)
|
||||
@@ -146,6 +152,32 @@ public class MainMenuManager : MonoBehaviour
|
||||
CupidLobby.instance.Matchmake();
|
||||
}
|
||||
|
||||
public void OnPlayTutorial()
|
||||
{
|
||||
if (LoginManager.CurrentUser == null)
|
||||
{
|
||||
Debug.LogError("Tutorial blocked: user profile not loaded.");
|
||||
return;
|
||||
}
|
||||
if (LevelLoadManager.instance == null)
|
||||
{
|
||||
Debug.LogError("Tutorial blocked: LevelLoadManager is missing.");
|
||||
return;
|
||||
}
|
||||
StartCoroutine(CoLaunchTutorial());
|
||||
}
|
||||
|
||||
IEnumerator CoLaunchTutorial()
|
||||
{
|
||||
MatchmadePlayer myPlayer = GameTutorialManager.CreateMyPlayerFromUser(LoginManager.CurrentUser);
|
||||
MatchmadePlayer cpuPlayer = GameTutorialManager.CreateCpuOpponent();
|
||||
|
||||
yield return GameTutorialManager.CoFetchPlayerL10(myPlayer);
|
||||
|
||||
GameTutorialManager.PrepareLaunch(myPlayer, cpuPlayer);
|
||||
LevelLoadManager.LoadLevel(tutorialGameScene);
|
||||
}
|
||||
|
||||
void OnCryptoAddressChanged(string value)
|
||||
{
|
||||
PlayerPrefs.SetString(CryptoAddressPrefsKey, value ?? string.Empty);
|
||||
|
||||
@@ -39,7 +39,7 @@ public class TutorialManagerMainMenu : MonoBehaviour
|
||||
btnSkip.onClick.AddListener(OnSkip);
|
||||
btnNext2.onClick.AddListener(OnNext2);
|
||||
|
||||
btnFinish.onClick.AddListener(OnTutorialCompleted);
|
||||
btnFinish.onClick.AddListener(OnStartTutorialMatch);
|
||||
|
||||
if(!forceShow){
|
||||
if(PlayerPrefs.HasKey(TUTORIAL_PREF_KEY)){
|
||||
@@ -103,6 +103,13 @@ public class TutorialManagerMainMenu : MonoBehaviour
|
||||
tutorialPanel.SetActive(false);
|
||||
}
|
||||
|
||||
void OnStartTutorialMatch()
|
||||
{
|
||||
OnTutorialCompleted();
|
||||
if (MainMenuManager.instance != null)
|
||||
MainMenuManager.instance.OnPlayTutorial();
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if(curScreen < 2){return;}
|
||||
|
||||
Reference in New Issue
Block a user