Commit 30704ce9 authored by Abdulrahman Mohammed's avatar Abdulrahman Mohammed

Done with NPCs in lobby

parent 719329b1
...@@ -20,7 +20,47 @@ MonoBehaviour: ...@@ -20,7 +20,47 @@ MonoBehaviour:
SourceHashToOverride: 0 SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0} OverridingTargetPrefab: {fileID: 0}
- Override: 0 - Override: 0
Prefab: {fileID: 8291014476316640429, guid: bc73aef3505b0e74eb22a46a63a2b23c, type: 3} Prefab: {fileID: 6869359625592689313, guid: 29c311971269db94990ae48b1f666293, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
- Override: 0
Prefab: {fileID: 7987493137821725887, guid: 28d7b110eacfe554cb177ef86d76bd7c, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
- Override: 0
Prefab: {fileID: 7193057044126680390, guid: c6e0651bc44ba9f409a5d42ea5643f6f, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
- Override: 0
Prefab: {fileID: 1698350363645929408, guid: 6fef511f71c2f88418c14e5a4afb8f11, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
- Override: 0
Prefab: {fileID: 873965636843474627, guid: 68bd54ad24006f94dbb146eb2fe9591e, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
- Override: 0
Prefab: {fileID: 1677546864663295365, guid: 0078a2e176b908c45aa883f048fc43a4, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
- Override: 0
Prefab: {fileID: 3824715583433605288, guid: fbf52492f3d40c646b67885c3076a67d, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
- Override: 0
Prefab: {fileID: 2175243213733850576, guid: 6e1553e4833547f42b69e41a89cd6513, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
- Override: 0
Prefab: {fileID: 8074876253474731934, guid: 65e893d6d8280ff4eba19d6987deed16, type: 3}
SourcePrefabToOverride: {fileID: 0} SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0 SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0} OverridingTargetPrefab: {fileID: 0}
...@@ -4087,6 +4087,9 @@ GameObject: ...@@ -4087,6 +4087,9 @@ GameObject:
- component: {fileID: 6792771870626713340} - component: {fileID: 6792771870626713340}
- component: {fileID: 9180733274907734800} - component: {fileID: 9180733274907734800}
- component: {fileID: 7239363159011139443} - component: {fileID: 7239363159011139443}
- component: {fileID: 4571425764186860664}
- component: {fileID: 750448506894433358}
- component: {fileID: 7059936128646914008}
m_Layer: 3 m_Layer: 3
m_Name: Crocodile m_Name: Crocodile
m_TagString: Untagged m_TagString: Untagged
...@@ -4224,6 +4227,125 @@ MonoBehaviour: ...@@ -4224,6 +4227,125 @@ MonoBehaviour:
healthColor: {r: 0, g: 0.8039216, b: 0.043137256, a: 1} healthColor: {r: 0, g: 0.8039216, b: 0.043137256, a: 1}
healthBackgroundColor: {r: 1, g: 1, b: 1, a: 1} healthBackgroundColor: {r: 1, g: 1, b: 1, a: 1}
dieParticleSystem: {fileID: 646967056338719950} dieParticleSystem: {fileID: 646967056338719950}
--- !u!114 &4571425764186860664
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8074876253474731934}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkObject
GlobalObjectIdHash: 0
InScenePlacedSourceGlobalObjectIdHash: 0
DeferredDespawnTick: 0
Ownership: 1
AlwaysReplicateAsRoot: 0
SynchronizeTransform: 1
ActiveSceneSynchronization: 0
SceneMigrationSynchronization: 1
SpawnWithObservers: 1
DontDestroyWithOwner: 0
AutoObjectParentSync: 1
SyncOwnerTransformWhenParented: 1
AllowOwnerToParent: 0
--- !u!114 &750448506894433358
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8074876253474731934}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e96cb6065543e43c4a752faaa1468eb1, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.Components.NetworkTransform
ShowTopMostFoldoutHeaderGroup: 1
NetworkTransformExpanded: 0
AutoOwnerAuthorityTickOffset: 1
PositionInterpolationType: 0
RotationInterpolationType: 0
ScaleInterpolationType: 0
PositionLerpSmoothing: 1
PositionMaxInterpolationTime: 0.1
RotationLerpSmoothing: 1
RotationMaxInterpolationTime: 0.1
ScaleLerpSmoothing: 1
ScaleMaxInterpolationTime: 0.1
AuthorityMode: 1
TickSyncChildren: 0
UseUnreliableDeltas: 0
SyncPositionX: 1
SyncPositionY: 1
SyncPositionZ: 1
SyncRotAngleX: 1
SyncRotAngleY: 1
SyncRotAngleZ: 1
SyncScaleX: 0
SyncScaleY: 0
SyncScaleZ: 0
PositionThreshold: 0.001
RotAngleThreshold: 0.01
ScaleThreshold: 0.01
UseQuaternionSynchronization: 0
UseQuaternionCompression: 0
UseHalfFloatPrecision: 0
InLocalSpace: 0
SwitchTransformSpaceWhenParented: 0
Interpolate: 1
SlerpPosition: 0
--- !u!114 &7059936128646914008
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8074876253474731934}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e8d0727d5ae3244e3b569694d3912374, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.Components.NetworkAnimator
ShowTopMostFoldoutHeaderGroup: 1
NetworkAnimatorExpanded: 0
AuthorityMode: 1
m_Animator: {fileID: 1551918764560250124}
TransitionStateInfoList: []
AnimatorParameterEntries:
ParameterEntries:
- name: isWalking
NameHash: -830007593
Synchronize: 1
ParameterType: 4
- name: isSwimming
NameHash: 495657617
Synchronize: 1
ParameterType: 4
- name: isDead
NameHash: 1276664872
Synchronize: 1
ParameterType: 4
- name: isAttacking
NameHash: 973584577
Synchronize: 1
ParameterType: 4
- name: isAttacking_2
NameHash: -1552489134
Synchronize: 1
ParameterType: 4
- name: isIdeal
NameHash: -1716679403
Synchronize: 1
ParameterType: 4
- name: isRunning
NameHash: 1239866031
Synchronize: 1
ParameterType: 4
AnimatorParametersExpanded: 0
--- !u!1 &8201245350561391609 --- !u!1 &8201245350561391609
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
...@@ -601,6 +601,9 @@ GameObject: ...@@ -601,6 +601,9 @@ GameObject:
- component: {fileID: 7800256244418275688} - component: {fileID: 7800256244418275688}
- component: {fileID: 7440580058684414760} - component: {fileID: 7440580058684414760}
- component: {fileID: 6092317265662781462} - component: {fileID: 6092317265662781462}
- component: {fileID: 291547076294712862}
- component: {fileID: 1203584073287534396}
- component: {fileID: 4216863301324652201}
m_Layer: 3 m_Layer: 3
m_Name: 1_Ostrich m_Name: 1_Ostrich
m_TagString: Untagged m_TagString: Untagged
...@@ -737,6 +740,117 @@ MonoBehaviour: ...@@ -737,6 +740,117 @@ MonoBehaviour:
healthColor: {r: 0, g: 0.8039216, b: 0.043137256, a: 1} healthColor: {r: 0, g: 0.8039216, b: 0.043137256, a: 1}
healthBackgroundColor: {r: 1, g: 1, b: 1, a: 1} healthBackgroundColor: {r: 1, g: 1, b: 1, a: 1}
dieParticleSystem: {fileID: 3369560982145558529} dieParticleSystem: {fileID: 3369560982145558529}
--- !u!114 &291547076294712862
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1698350363645929408}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkObject
GlobalObjectIdHash: 0
InScenePlacedSourceGlobalObjectIdHash: 0
DeferredDespawnTick: 0
Ownership: 1
AlwaysReplicateAsRoot: 0
SynchronizeTransform: 1
ActiveSceneSynchronization: 0
SceneMigrationSynchronization: 1
SpawnWithObservers: 1
DontDestroyWithOwner: 0
AutoObjectParentSync: 1
SyncOwnerTransformWhenParented: 1
AllowOwnerToParent: 0
--- !u!114 &1203584073287534396
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1698350363645929408}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e96cb6065543e43c4a752faaa1468eb1, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.Components.NetworkTransform
ShowTopMostFoldoutHeaderGroup: 1
NetworkTransformExpanded: 0
AutoOwnerAuthorityTickOffset: 1
PositionInterpolationType: 0
RotationInterpolationType: 0
ScaleInterpolationType: 0
PositionLerpSmoothing: 1
PositionMaxInterpolationTime: 0.1
RotationLerpSmoothing: 1
RotationMaxInterpolationTime: 0.1
ScaleLerpSmoothing: 1
ScaleMaxInterpolationTime: 0.1
AuthorityMode: 1
TickSyncChildren: 0
UseUnreliableDeltas: 0
SyncPositionX: 1
SyncPositionY: 1
SyncPositionZ: 1
SyncRotAngleX: 1
SyncRotAngleY: 1
SyncRotAngleZ: 1
SyncScaleX: 0
SyncScaleY: 0
SyncScaleZ: 0
PositionThreshold: 0.001
RotAngleThreshold: 0.01
ScaleThreshold: 0.01
UseQuaternionSynchronization: 0
UseQuaternionCompression: 0
UseHalfFloatPrecision: 0
InLocalSpace: 0
SwitchTransformSpaceWhenParented: 0
Interpolate: 1
SlerpPosition: 0
--- !u!114 &4216863301324652201
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1698350363645929408}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e8d0727d5ae3244e3b569694d3912374, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.Components.NetworkAnimator
ShowTopMostFoldoutHeaderGroup: 1
NetworkAnimatorExpanded: 0
AuthorityMode: 1
m_Animator: {fileID: 6851323559094377791}
TransitionStateInfoList: []
AnimatorParameterEntries:
ParameterEntries:
- name: isWalking
NameHash: -830007593
Synchronize: 1
ParameterType: 4
- name: isRunning
NameHash: 1239866031
Synchronize: 1
ParameterType: 4
- name: isDead
NameHash: 1276664872
Synchronize: 1
ParameterType: 4
- name: isAttacking
NameHash: 973584577
Synchronize: 1
ParameterType: 4
- name: isIdeal
NameHash: -1716679403
Synchronize: 1
ParameterType: 4
AnimatorParametersExpanded: 0
--- !u!1 &1716282966533728919 --- !u!1 &1716282966533728919
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
...@@ -431,6 +431,9 @@ GameObject: ...@@ -431,6 +431,9 @@ GameObject:
- component: {fileID: 1126594263064233863} - component: {fileID: 1126594263064233863}
- component: {fileID: 4268953564234010434} - component: {fileID: 4268953564234010434}
- component: {fileID: 778063317746192726} - component: {fileID: 778063317746192726}
- component: {fileID: 5598616148842523305}
- component: {fileID: 8602419029893464424}
- component: {fileID: 2551338929655459012}
m_Layer: 3 m_Layer: 3
m_Name: 2_Lion m_Name: 2_Lion
m_TagString: Untagged m_TagString: Untagged
...@@ -567,6 +570,117 @@ MonoBehaviour: ...@@ -567,6 +570,117 @@ MonoBehaviour:
healthColor: {r: 0, g: 0.8039216, b: 0.043137256, a: 1} healthColor: {r: 0, g: 0.8039216, b: 0.043137256, a: 1}
healthBackgroundColor: {r: 1, g: 1, b: 1, a: 1} healthBackgroundColor: {r: 1, g: 1, b: 1, a: 1}
dieParticleSystem: {fileID: 7666945456229301054} dieParticleSystem: {fileID: 7666945456229301054}
--- !u!114 &5598616148842523305
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1677546864663295365}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkObject
GlobalObjectIdHash: 0
InScenePlacedSourceGlobalObjectIdHash: 0
DeferredDespawnTick: 0
Ownership: 1
AlwaysReplicateAsRoot: 0
SynchronizeTransform: 1
ActiveSceneSynchronization: 0
SceneMigrationSynchronization: 1
SpawnWithObservers: 1
DontDestroyWithOwner: 0
AutoObjectParentSync: 1
SyncOwnerTransformWhenParented: 1
AllowOwnerToParent: 0
--- !u!114 &8602419029893464424
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1677546864663295365}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e96cb6065543e43c4a752faaa1468eb1, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.Components.NetworkTransform
ShowTopMostFoldoutHeaderGroup: 1
NetworkTransformExpanded: 0
AutoOwnerAuthorityTickOffset: 1
PositionInterpolationType: 0
RotationInterpolationType: 0
ScaleInterpolationType: 0
PositionLerpSmoothing: 1
PositionMaxInterpolationTime: 0.1
RotationLerpSmoothing: 1
RotationMaxInterpolationTime: 0.1
ScaleLerpSmoothing: 1
ScaleMaxInterpolationTime: 0.1
AuthorityMode: 1
TickSyncChildren: 0
UseUnreliableDeltas: 0
SyncPositionX: 1
SyncPositionY: 1
SyncPositionZ: 1
SyncRotAngleX: 1
SyncRotAngleY: 1
SyncRotAngleZ: 1
SyncScaleX: 0
SyncScaleY: 0
SyncScaleZ: 0
PositionThreshold: 0.001
RotAngleThreshold: 0.01
ScaleThreshold: 0.01
UseQuaternionSynchronization: 0
UseQuaternionCompression: 0
UseHalfFloatPrecision: 0
InLocalSpace: 0
SwitchTransformSpaceWhenParented: 0
Interpolate: 1
SlerpPosition: 0
--- !u!114 &2551338929655459012
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1677546864663295365}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e8d0727d5ae3244e3b569694d3912374, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.Components.NetworkAnimator
ShowTopMostFoldoutHeaderGroup: 1
NetworkAnimatorExpanded: 0
AuthorityMode: 1
m_Animator: {fileID: 6459466032477248462}
TransitionStateInfoList: []
AnimatorParameterEntries:
ParameterEntries:
- name: isWalking
NameHash: -830007593
Synchronize: 1
ParameterType: 4
- name: isDead
NameHash: 1276664872
Synchronize: 1
ParameterType: 4
- name: isRunning
NameHash: 1239866031
Synchronize: 1
ParameterType: 4
- name: isAttacking
NameHash: 973584577
Synchronize: 1
ParameterType: 4
- name: isIdeal
NameHash: -1716679403
Synchronize: 1
ParameterType: 4
AnimatorParametersExpanded: 0
--- !u!1 &1706674262722341694 --- !u!1 &1706674262722341694
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
...@@ -78,6 +78,9 @@ GameObject: ...@@ -78,6 +78,9 @@ GameObject:
- component: {fileID: 4822465631271738262} - component: {fileID: 4822465631271738262}
- component: {fileID: 2124509925014609588} - component: {fileID: 2124509925014609588}
- component: {fileID: 7977733509209312240} - component: {fileID: 7977733509209312240}
- component: {fileID: 5355227569531775110}
- component: {fileID: 5677288889425026893}
- component: {fileID: 7721228240351520642}
m_Layer: 3 m_Layer: 3
m_Name: 3_Snake m_Name: 3_Snake
m_TagString: Untagged m_TagString: Untagged
...@@ -214,6 +217,117 @@ MonoBehaviour: ...@@ -214,6 +217,117 @@ MonoBehaviour:
healthColor: {r: 0, g: 0.8039216, b: 0.043137256, a: 1} healthColor: {r: 0, g: 0.8039216, b: 0.043137256, a: 1}
healthBackgroundColor: {r: 1, g: 1, b: 1, a: 1} healthBackgroundColor: {r: 1, g: 1, b: 1, a: 1}
dieParticleSystem: {fileID: 7213738999383922802} dieParticleSystem: {fileID: 7213738999383922802}
--- !u!114 &5355227569531775110
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 873965636843474627}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkObject
GlobalObjectIdHash: 0
InScenePlacedSourceGlobalObjectIdHash: 0
DeferredDespawnTick: 0
Ownership: 1
AlwaysReplicateAsRoot: 0
SynchronizeTransform: 1
ActiveSceneSynchronization: 0
SceneMigrationSynchronization: 1
SpawnWithObservers: 1
DontDestroyWithOwner: 0
AutoObjectParentSync: 1
SyncOwnerTransformWhenParented: 1
AllowOwnerToParent: 0
--- !u!114 &5677288889425026893
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 873965636843474627}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e96cb6065543e43c4a752faaa1468eb1, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.Components.NetworkTransform
ShowTopMostFoldoutHeaderGroup: 1
NetworkTransformExpanded: 0
AutoOwnerAuthorityTickOffset: 1
PositionInterpolationType: 0
RotationInterpolationType: 0
ScaleInterpolationType: 0
PositionLerpSmoothing: 1
PositionMaxInterpolationTime: 0.1
RotationLerpSmoothing: 1
RotationMaxInterpolationTime: 0.1
ScaleLerpSmoothing: 1
ScaleMaxInterpolationTime: 0.1
AuthorityMode: 1
TickSyncChildren: 0
UseUnreliableDeltas: 0
SyncPositionX: 1
SyncPositionY: 1
SyncPositionZ: 1
SyncRotAngleX: 1
SyncRotAngleY: 1
SyncRotAngleZ: 1
SyncScaleX: 0
SyncScaleY: 0
SyncScaleZ: 0
PositionThreshold: 0.001
RotAngleThreshold: 0.01
ScaleThreshold: 0.01
UseQuaternionSynchronization: 0
UseQuaternionCompression: 0
UseHalfFloatPrecision: 0
InLocalSpace: 0
SwitchTransformSpaceWhenParented: 0
Interpolate: 1
SlerpPosition: 0
--- !u!114 &7721228240351520642
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 873965636843474627}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e8d0727d5ae3244e3b569694d3912374, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.Components.NetworkAnimator
ShowTopMostFoldoutHeaderGroup: 1
NetworkAnimatorExpanded: 0
AuthorityMode: 1
m_Animator: {fileID: 8656619858840122932}
TransitionStateInfoList: []
AnimatorParameterEntries:
ParameterEntries:
- name: isWalking
NameHash: -830007593
Synchronize: 1
ParameterType: 4
- name: isAttacking
NameHash: 973584577
Synchronize: 1
ParameterType: 4
- name: isDead
NameHash: 1276664872
Synchronize: 1
ParameterType: 4
- name: isIdeal
NameHash: -1716679403
Synchronize: 1
ParameterType: 4
- name: isRunning
NameHash: 1239866031
Synchronize: 1
ParameterType: 4
AnimatorParametersExpanded: 0
--- !u!1 &946267108887313177 --- !u!1 &946267108887313177
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
...@@ -1593,6 +1593,9 @@ GameObject: ...@@ -1593,6 +1593,9 @@ GameObject:
- component: {fileID: 4587217831811207212} - component: {fileID: 4587217831811207212}
- component: {fileID: 1812193164498966169} - component: {fileID: 1812193164498966169}
- component: {fileID: 2096040867519590702} - component: {fileID: 2096040867519590702}
- component: {fileID: 9218131098084809687}
- component: {fileID: 9183291462547310532}
- component: {fileID: 8478630006387921373}
m_Layer: 3 m_Layer: 3
m_Name: 1_Bear m_Name: 1_Bear
m_TagString: Untagged m_TagString: Untagged
...@@ -1729,6 +1732,121 @@ MonoBehaviour: ...@@ -1729,6 +1732,121 @@ MonoBehaviour:
healthColor: {r: 0, g: 0.8039216, b: 0.043137256, a: 1} healthColor: {r: 0, g: 0.8039216, b: 0.043137256, a: 1}
healthBackgroundColor: {r: 1, g: 1, b: 1, a: 1} healthBackgroundColor: {r: 1, g: 1, b: 1, a: 1}
dieParticleSystem: {fileID: 8856589872205351049} dieParticleSystem: {fileID: 8856589872205351049}
--- !u!114 &9218131098084809687
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7987493137821725887}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkObject
GlobalObjectIdHash: 0
InScenePlacedSourceGlobalObjectIdHash: 0
DeferredDespawnTick: 0
Ownership: 1
AlwaysReplicateAsRoot: 0
SynchronizeTransform: 1
ActiveSceneSynchronization: 0
SceneMigrationSynchronization: 1
SpawnWithObservers: 1
DontDestroyWithOwner: 0
AutoObjectParentSync: 1
SyncOwnerTransformWhenParented: 1
AllowOwnerToParent: 0
--- !u!114 &9183291462547310532
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7987493137821725887}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e96cb6065543e43c4a752faaa1468eb1, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.Components.NetworkTransform
ShowTopMostFoldoutHeaderGroup: 1
NetworkTransformExpanded: 0
AutoOwnerAuthorityTickOffset: 1
PositionInterpolationType: 0
RotationInterpolationType: 0
ScaleInterpolationType: 0
PositionLerpSmoothing: 1
PositionMaxInterpolationTime: 0.1
RotationLerpSmoothing: 1
RotationMaxInterpolationTime: 0.1
ScaleLerpSmoothing: 1
ScaleMaxInterpolationTime: 0.1
AuthorityMode: 1
TickSyncChildren: 0
UseUnreliableDeltas: 0
SyncPositionX: 1
SyncPositionY: 1
SyncPositionZ: 1
SyncRotAngleX: 1
SyncRotAngleY: 1
SyncRotAngleZ: 1
SyncScaleX: 0
SyncScaleY: 0
SyncScaleZ: 0
PositionThreshold: 0.001
RotAngleThreshold: 0.01
ScaleThreshold: 0.01
UseQuaternionSynchronization: 0
UseQuaternionCompression: 0
UseHalfFloatPrecision: 0
InLocalSpace: 0
SwitchTransformSpaceWhenParented: 0
Interpolate: 1
SlerpPosition: 0
--- !u!114 &8478630006387921373
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7987493137821725887}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e8d0727d5ae3244e3b569694d3912374, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.Components.NetworkAnimator
ShowTopMostFoldoutHeaderGroup: 1
NetworkAnimatorExpanded: 0
AuthorityMode: 1
m_Animator: {fileID: 1757435605456235488}
TransitionStateInfoList: []
AnimatorParameterEntries:
ParameterEntries:
- name: isWalking
NameHash: -830007593
Synchronize: 1
ParameterType: 4
- name: isStanding
NameHash: -90665157
Synchronize: 1
ParameterType: 4
- name: isDead
NameHash: 1276664872
Synchronize: 1
ParameterType: 4
- name: isRunning
NameHash: 1239866031
Synchronize: 1
ParameterType: 4
- name: isAttacking
NameHash: 973584577
Synchronize: 1
ParameterType: 4
- name: isIdeal
NameHash: -1716679403
Synchronize: 1
ParameterType: 4
AnimatorParametersExpanded: 0
--- !u!1 &8454956216973555179 --- !u!1 &8454956216973555179
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
...@@ -3206,6 +3206,9 @@ GameObject: ...@@ -3206,6 +3206,9 @@ GameObject:
- component: {fileID: 3783874149540798066} - component: {fileID: 3783874149540798066}
- component: {fileID: 40797814380045437} - component: {fileID: 40797814380045437}
- component: {fileID: 5564318125892087809} - component: {fileID: 5564318125892087809}
- component: {fileID: 4102980035606371738}
- component: {fileID: 7864252769378625448}
- component: {fileID: 6881622347556982677}
m_Layer: 3 m_Layer: 3
m_Name: 2_Monkey m_Name: 2_Monkey
m_TagString: Untagged m_TagString: Untagged
...@@ -3342,6 +3345,117 @@ MonoBehaviour: ...@@ -3342,6 +3345,117 @@ MonoBehaviour:
healthColor: {r: 0, g: 0.8039216, b: 0.043137256, a: 1} healthColor: {r: 0, g: 0.8039216, b: 0.043137256, a: 1}
healthBackgroundColor: {r: 1, g: 1, b: 1, a: 1} healthBackgroundColor: {r: 1, g: 1, b: 1, a: 1}
dieParticleSystem: {fileID: 2289348640615392363} dieParticleSystem: {fileID: 2289348640615392363}
--- !u!114 &4102980035606371738
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7193057044126680390}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkObject
GlobalObjectIdHash: 0
InScenePlacedSourceGlobalObjectIdHash: 0
DeferredDespawnTick: 0
Ownership: 1
AlwaysReplicateAsRoot: 0
SynchronizeTransform: 1
ActiveSceneSynchronization: 0
SceneMigrationSynchronization: 1
SpawnWithObservers: 1
DontDestroyWithOwner: 0
AutoObjectParentSync: 1
SyncOwnerTransformWhenParented: 1
AllowOwnerToParent: 0
--- !u!114 &7864252769378625448
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7193057044126680390}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e96cb6065543e43c4a752faaa1468eb1, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.Components.NetworkTransform
ShowTopMostFoldoutHeaderGroup: 1
NetworkTransformExpanded: 0
AutoOwnerAuthorityTickOffset: 1
PositionInterpolationType: 0
RotationInterpolationType: 0
ScaleInterpolationType: 0
PositionLerpSmoothing: 1
PositionMaxInterpolationTime: 0.1
RotationLerpSmoothing: 1
RotationMaxInterpolationTime: 0.1
ScaleLerpSmoothing: 1
ScaleMaxInterpolationTime: 0.1
AuthorityMode: 1
TickSyncChildren: 0
UseUnreliableDeltas: 0
SyncPositionX: 1
SyncPositionY: 1
SyncPositionZ: 1
SyncRotAngleX: 1
SyncRotAngleY: 1
SyncRotAngleZ: 1
SyncScaleX: 0
SyncScaleY: 0
SyncScaleZ: 0
PositionThreshold: 0.001
RotAngleThreshold: 0.01
ScaleThreshold: 0.01
UseQuaternionSynchronization: 0
UseQuaternionCompression: 0
UseHalfFloatPrecision: 0
InLocalSpace: 0
SwitchTransformSpaceWhenParented: 0
Interpolate: 1
SlerpPosition: 0
--- !u!114 &6881622347556982677
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7193057044126680390}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e8d0727d5ae3244e3b569694d3912374, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.Components.NetworkAnimator
ShowTopMostFoldoutHeaderGroup: 1
NetworkAnimatorExpanded: 0
AuthorityMode: 1
m_Animator: {fileID: 6421579595040200206}
TransitionStateInfoList: []
AnimatorParameterEntries:
ParameterEntries:
- name: isWalking
NameHash: -830007593
Synchronize: 1
ParameterType: 4
- name: isDead
NameHash: 1276664872
Synchronize: 1
ParameterType: 4
- name: isRunning
NameHash: 1239866031
Synchronize: 1
ParameterType: 4
- name: isAttacking
NameHash: 973584577
Synchronize: 1
ParameterType: 4
- name: isIdeal
NameHash: -1716679403
Synchronize: 1
ParameterType: 4
AnimatorParametersExpanded: 0
--- !u!1 &7216615805871778942 --- !u!1 &7216615805871778942
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
...@@ -691,6 +691,9 @@ GameObject: ...@@ -691,6 +691,9 @@ GameObject:
- component: {fileID: 3092277464417715587} - component: {fileID: 3092277464417715587}
- component: {fileID: 313242795030673799} - component: {fileID: 313242795030673799}
- component: {fileID: 8323765429530532640} - component: {fileID: 8323765429530532640}
- component: {fileID: 7402198531555784763}
- component: {fileID: 1423116922813539718}
- component: {fileID: 1852338244867861846}
m_Layer: 3 m_Layer: 3
m_Name: 1_Penguin m_Name: 1_Penguin
m_TagString: Untagged m_TagString: Untagged
...@@ -827,6 +830,117 @@ MonoBehaviour: ...@@ -827,6 +830,117 @@ MonoBehaviour:
healthColor: {r: 0, g: 0.8039216, b: 0.043137256, a: 1} healthColor: {r: 0, g: 0.8039216, b: 0.043137256, a: 1}
healthBackgroundColor: {r: 1, g: 1, b: 1, a: 1} healthBackgroundColor: {r: 1, g: 1, b: 1, a: 1}
dieParticleSystem: {fileID: 3651862403165494120} dieParticleSystem: {fileID: 3651862403165494120}
--- !u!114 &7402198531555784763
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3824715583433605288}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkObject
GlobalObjectIdHash: 0
InScenePlacedSourceGlobalObjectIdHash: 0
DeferredDespawnTick: 0
Ownership: 1
AlwaysReplicateAsRoot: 0
SynchronizeTransform: 1
ActiveSceneSynchronization: 0
SceneMigrationSynchronization: 1
SpawnWithObservers: 1
DontDestroyWithOwner: 0
AutoObjectParentSync: 1
SyncOwnerTransformWhenParented: 1
AllowOwnerToParent: 0
--- !u!114 &1423116922813539718
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3824715583433605288}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e96cb6065543e43c4a752faaa1468eb1, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.Components.NetworkTransform
ShowTopMostFoldoutHeaderGroup: 1
NetworkTransformExpanded: 0
AutoOwnerAuthorityTickOffset: 1
PositionInterpolationType: 0
RotationInterpolationType: 0
ScaleInterpolationType: 0
PositionLerpSmoothing: 1
PositionMaxInterpolationTime: 0.1
RotationLerpSmoothing: 1
RotationMaxInterpolationTime: 0.1
ScaleLerpSmoothing: 1
ScaleMaxInterpolationTime: 0.1
AuthorityMode: 1
TickSyncChildren: 0
UseUnreliableDeltas: 0
SyncPositionX: 1
SyncPositionY: 1
SyncPositionZ: 1
SyncRotAngleX: 1
SyncRotAngleY: 1
SyncRotAngleZ: 1
SyncScaleX: 0
SyncScaleY: 0
SyncScaleZ: 0
PositionThreshold: 0.001
RotAngleThreshold: 0.01
ScaleThreshold: 0.01
UseQuaternionSynchronization: 0
UseQuaternionCompression: 0
UseHalfFloatPrecision: 0
InLocalSpace: 0
SwitchTransformSpaceWhenParented: 0
Interpolate: 1
SlerpPosition: 0
--- !u!114 &1852338244867861846
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3824715583433605288}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e8d0727d5ae3244e3b569694d3912374, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.Components.NetworkAnimator
ShowTopMostFoldoutHeaderGroup: 1
NetworkAnimatorExpanded: 0
AuthorityMode: 0
m_Animator: {fileID: 2604803186513422814}
TransitionStateInfoList: []
AnimatorParameterEntries:
ParameterEntries:
- name: isWalking
NameHash: -830007593
Synchronize: 1
ParameterType: 4
- name: isShaking
NameHash: -447240259
Synchronize: 1
ParameterType: 4
- name: isDead
NameHash: 1276664872
Synchronize: 1
ParameterType: 4
- name: isRunning
NameHash: 1239866031
Synchronize: 1
ParameterType: 4
- name: isIdeal
NameHash: -1716679403
Synchronize: 1
ParameterType: 4
AnimatorParametersExpanded: 0
--- !u!1 &4043957257123555897 --- !u!1 &4043957257123555897
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
...@@ -433,6 +433,9 @@ GameObject: ...@@ -433,6 +433,9 @@ GameObject:
- component: {fileID: 3014964892884752573} - component: {fileID: 3014964892884752573}
- component: {fileID: 1868278021961101916} - component: {fileID: 1868278021961101916}
- component: {fileID: 8329710285400560417} - component: {fileID: 8329710285400560417}
- component: {fileID: 3279209143921719585}
- component: {fileID: 4785301330124650245}
- component: {fileID: 8098808694983725260}
m_Layer: 3 m_Layer: 3
m_Name: 1_PolarBear m_Name: 1_PolarBear
m_TagString: Untagged m_TagString: Untagged
...@@ -569,6 +572,121 @@ MonoBehaviour: ...@@ -569,6 +572,121 @@ MonoBehaviour:
healthColor: {r: 0, g: 0.8039216, b: 0.043137256, a: 1} healthColor: {r: 0, g: 0.8039216, b: 0.043137256, a: 1}
healthBackgroundColor: {r: 1, g: 1, b: 1, a: 1} healthBackgroundColor: {r: 1, g: 1, b: 1, a: 1}
dieParticleSystem: {fileID: 1212170556263768825} dieParticleSystem: {fileID: 1212170556263768825}
--- !u!114 &3279209143921719585
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2175243213733850576}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkObject
GlobalObjectIdHash: 0
InScenePlacedSourceGlobalObjectIdHash: 0
DeferredDespawnTick: 0
Ownership: 1
AlwaysReplicateAsRoot: 0
SynchronizeTransform: 1
ActiveSceneSynchronization: 0
SceneMigrationSynchronization: 1
SpawnWithObservers: 1
DontDestroyWithOwner: 0
AutoObjectParentSync: 1
SyncOwnerTransformWhenParented: 1
AllowOwnerToParent: 0
--- !u!114 &4785301330124650245
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2175243213733850576}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e96cb6065543e43c4a752faaa1468eb1, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.Components.NetworkTransform
ShowTopMostFoldoutHeaderGroup: 1
NetworkTransformExpanded: 0
AutoOwnerAuthorityTickOffset: 1
PositionInterpolationType: 0
RotationInterpolationType: 0
ScaleInterpolationType: 0
PositionLerpSmoothing: 1
PositionMaxInterpolationTime: 0.1
RotationLerpSmoothing: 1
RotationMaxInterpolationTime: 0.1
ScaleLerpSmoothing: 1
ScaleMaxInterpolationTime: 0.1
AuthorityMode: 1
TickSyncChildren: 0
UseUnreliableDeltas: 0
SyncPositionX: 1
SyncPositionY: 1
SyncPositionZ: 1
SyncRotAngleX: 1
SyncRotAngleY: 1
SyncRotAngleZ: 1
SyncScaleX: 0
SyncScaleY: 0
SyncScaleZ: 0
PositionThreshold: 0.001
RotAngleThreshold: 0.01
ScaleThreshold: 0.01
UseQuaternionSynchronization: 0
UseQuaternionCompression: 0
UseHalfFloatPrecision: 0
InLocalSpace: 0
SwitchTransformSpaceWhenParented: 0
Interpolate: 1
SlerpPosition: 0
--- !u!114 &8098808694983725260
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2175243213733850576}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e8d0727d5ae3244e3b569694d3912374, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.Components.NetworkAnimator
ShowTopMostFoldoutHeaderGroup: 1
NetworkAnimatorExpanded: 0
AuthorityMode: 1
m_Animator: {fileID: 5946812577701127397}
TransitionStateInfoList: []
AnimatorParameterEntries:
ParameterEntries:
- name: isWalking
NameHash: -830007593
Synchronize: 1
ParameterType: 4
- name: isStanding
NameHash: -90665157
Synchronize: 1
ParameterType: 4
- name: isDead
NameHash: 1276664872
Synchronize: 1
ParameterType: 4
- name: isRunning
NameHash: 1239866031
Synchronize: 1
ParameterType: 4
- name: isAttacking
NameHash: 973584577
Synchronize: 1
ParameterType: 4
- name: isIdeal
NameHash: -1716679403
Synchronize: 1
ParameterType: 4
AnimatorParametersExpanded: 0
--- !u!1 &2472391401875508105 --- !u!1 &2472391401875508105
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
...@@ -157,7 +157,7 @@ GameObject: ...@@ -157,7 +157,7 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 8976175737762051185} - component: {fileID: 8976175737762051185}
- component: {fileID: 4424878621612125368} - component: {fileID: 4424878621612125368}
- component: {fileID: 9063519449268330463} - component: {fileID: 7462257593087947900}
m_Layer: 5 m_Layer: 5
m_Name: Text m_Name: Text
m_TagString: Untagged m_TagString: Untagged
...@@ -192,7 +192,7 @@ CanvasRenderer: ...@@ -192,7 +192,7 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1501786898965488615} m_GameObject: {fileID: 1501786898965488615}
m_CullTransparentMesh: 1 m_CullTransparentMesh: 1
--- !u!114 &9063519449268330463 --- !u!114 &7462257593087947900
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
...@@ -201,9 +201,9 @@ MonoBehaviour: ...@@ -201,9 +201,9 @@ MonoBehaviour:
m_GameObject: {fileID: 1501786898965488615} m_GameObject: {fileID: 1501786898965488615}
m_Enabled: 1 m_Enabled: 1
m_EditorHideFlags: 0 m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} m_Script: {fileID: 11500000, guid: b9839c2d141529145a431aef4d757ff3, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI m_EditorClassIdentifier: RTLTMPro::RTLTMPro.RTLTextMeshPro
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1 m_RaycastTarget: 1
...@@ -212,7 +212,7 @@ MonoBehaviour: ...@@ -212,7 +212,7 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_text: NPC 1 m_text: asdas
m_isRightToLeft: 0 m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
...@@ -221,8 +221,8 @@ MonoBehaviour: ...@@ -221,8 +221,8 @@ MonoBehaviour:
m_fontMaterials: [] m_fontMaterials: []
m_fontColor32: m_fontColor32:
serializedVersion: 2 serializedVersion: 2
rgba: 4294914304 rgba: 4278190335
m_fontColor: {r: 0, g: 0.1912303, b: 1, a: 1} m_fontColor: {r: 1, g: 0, b: 0, a: 1}
m_enableVertexGradient: 0 m_enableVertexGradient: 0
m_colorMode: 3 m_colorMode: 3
m_fontColorGradient: m_fontColorGradient:
...@@ -247,7 +247,7 @@ MonoBehaviour: ...@@ -247,7 +247,7 @@ MonoBehaviour:
m_fontSizeMax: 72 m_fontSizeMax: 72
m_fontStyle: 1 m_fontStyle: 1
m_HorizontalAlignment: 2 m_HorizontalAlignment: 2
m_VerticalAlignment: 256 m_VerticalAlignment: 512
m_textAlignment: 65535 m_textAlignment: 65535
m_characterSpacing: 0 m_characterSpacing: 0
m_characterHorizontalScale: 1 m_characterHorizontalScale: 1
...@@ -284,6 +284,11 @@ MonoBehaviour: ...@@ -284,6 +284,11 @@ MonoBehaviour:
m_hasFontAssetChanged: 0 m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0} m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
preserveNumbers: 0
farsi: 1
originalText: asdas
fixTags: 1
forceFix: 0
--- !u!1 &5068476814613741396 --- !u!1 &5068476814613741396
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -542,10 +547,13 @@ GameObject: ...@@ -542,10 +547,13 @@ GameObject:
- component: {fileID: 2752120739234160303} - component: {fileID: 2752120739234160303}
- component: {fileID: 1714055097601661496} - component: {fileID: 1714055097601661496}
- component: {fileID: 908567807309576769} - component: {fileID: 908567807309576769}
- component: {fileID: 6533416622245416413}
- component: {fileID: 4213376746885646846} - component: {fileID: 4213376746885646846}
- component: {fileID: 4343223469952472967} - component: {fileID: 4343223469952472967}
- component: {fileID: 8643326269112809739} - component: {fileID: 8643326269112809739}
- component: {fileID: 2981595010778208317} - component: {fileID: 2981595010778208317}
- component: {fileID: 80164591121225352}
- component: {fileID: 5761587338744970414}
m_Layer: 0 m_Layer: 0
m_Name: NPC m_Name: NPC
m_TagString: Untagged m_TagString: Untagged
...@@ -698,6 +706,31 @@ MonoBehaviour: ...@@ -698,6 +706,31 @@ MonoBehaviour:
HeadDamage: 2 HeadDamage: 2
BodyDamage: 1 BodyDamage: 1
gunAnimator: {fileID: 6807650472467015968} gunAnimator: {fileID: 6807650472467015968}
--- !u!114 &6533416622245416413
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6869359625592689313}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkObject
GlobalObjectIdHash: 2996614975
InScenePlacedSourceGlobalObjectIdHash: 0
DeferredDespawnTick: 0
Ownership: 1
AlwaysReplicateAsRoot: 0
SynchronizeTransform: 1
ActiveSceneSynchronization: 0
SceneMigrationSynchronization: 1
SpawnWithObservers: 1
DontDestroyWithOwner: 0
AutoObjectParentSync: 1
SyncOwnerTransformWhenParented: 1
AllowOwnerToParent: 0
--- !u!114 &4213376746885646846 --- !u!114 &4213376746885646846
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -710,6 +743,7 @@ MonoBehaviour: ...@@ -710,6 +743,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 04fec1f29c777934d9d0ad6f3f05433b, type: 3} m_Script: {fileID: 11500000, guid: 04fec1f29c777934d9d0ad6f3f05433b, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: Assembly-CSharp::PlayerScore m_EditorClassIdentifier: Assembly-CSharp::PlayerScore
ShowTopMostFoldoutHeaderGroup: 1
--- !u!114 &4343223469952472967 --- !u!114 &4343223469952472967
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -754,8 +788,113 @@ MonoBehaviour: ...@@ -754,8 +788,113 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 5d7d6b6aa5a393e40a69d8bb4d05b43e, type: 3} m_Script: {fileID: 11500000, guid: 5d7d6b6aa5a393e40a69d8bb4d05b43e, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: Assembly-CSharp::PlayerDetails m_EditorClassIdentifier: Assembly-CSharp::PlayerDetails
<PlayerName>k__BackingField: ShowTopMostFoldoutHeaderGroup: 1
<PlayerImage>k__BackingField: {fileID: 0} PlayerName:
m_InternalValue:
utf8LengthInBytes: 0
bytes:
offset0000:
byte0000: 0
byte0001: 0
byte0002: 0
byte0003: 0
byte0004: 0
byte0005: 0
byte0006: 0
byte0007: 0
byte0008: 0
byte0009: 0
byte0010: 0
byte0011: 0
byte0012: 0
byte0013: 0
byte0014: 0
byte0015: 0
byte0016: 0
byte0017: 0
byte0018: 0
byte0019: 0
byte0020: 0
byte0021: 0
byte0022: 0
byte0023: 0
byte0024: 0
byte0025: 0
byte0026: 0
byte0027: 0
byte0028: 0
byte0029: 0
nameText: {fileID: 7462257593087947900}
--- !u!114 &80164591121225352
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6869359625592689313}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e96cb6065543e43c4a752faaa1468eb1, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.Components.NetworkTransform
ShowTopMostFoldoutHeaderGroup: 1
NetworkTransformExpanded: 0
AutoOwnerAuthorityTickOffset: 1
PositionInterpolationType: 0
RotationInterpolationType: 0
ScaleInterpolationType: 0
PositionLerpSmoothing: 1
PositionMaxInterpolationTime: 0.1
RotationLerpSmoothing: 1
RotationMaxInterpolationTime: 0.1
ScaleLerpSmoothing: 1
ScaleMaxInterpolationTime: 0.1
AuthorityMode: 1
TickSyncChildren: 0
UseUnreliableDeltas: 0
SyncPositionX: 1
SyncPositionY: 1
SyncPositionZ: 1
SyncRotAngleX: 1
SyncRotAngleY: 1
SyncRotAngleZ: 1
SyncScaleX: 0
SyncScaleY: 0
SyncScaleZ: 0
PositionThreshold: 0.001
RotAngleThreshold: 0.01
ScaleThreshold: 0.01
UseQuaternionSynchronization: 0
UseQuaternionCompression: 0
UseHalfFloatPrecision: 0
InLocalSpace: 0
SwitchTransformSpaceWhenParented: 0
Interpolate: 1
SlerpPosition: 0
--- !u!114 &5761587338744970414
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6869359625592689313}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e8d0727d5ae3244e3b569694d3912374, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.Components.NetworkAnimator
ShowTopMostFoldoutHeaderGroup: 1
NetworkAnimatorExpanded: 0
AuthorityMode: 1
m_Animator: {fileID: 6807650472467015968}
TransitionStateInfoList: []
AnimatorParameterEntries:
ParameterEntries:
- name: Reload
NameHash: -1525363869
Synchronize: 1
ParameterType: 9
AnimatorParametersExpanded: 0
--- !u!1001 &97846783079897831 --- !u!1001 &97846783079897831
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
This diff is collapsed.
...@@ -1638,10 +1638,8 @@ MonoBehaviour: ...@@ -1638,10 +1638,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: Assembly-CSharp::PlayersInLobbyRoom m_EditorClassIdentifier: Assembly-CSharp::PlayersInLobbyRoom
<isBusySlot>k__BackingField: 0 <isBusySlot>k__BackingField: 0
<playerId>k__BackingField:
playerName: {fileID: 1185419686} playerName: {fileID: 1185419686}
avatarImage: {fileID: 1843712252} avatarImage: {fileID: 1843712252}
playerAvatarIndex: 0
readyButton: {fileID: 96477902} readyButton: {fileID: 96477902}
--- !u!1 &925825533 --- !u!1 &925825533
GameObject: GameObject:
...@@ -1807,10 +1805,8 @@ MonoBehaviour: ...@@ -1807,10 +1805,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: Assembly-CSharp::PlayersInLobbyRoom m_EditorClassIdentifier: Assembly-CSharp::PlayersInLobbyRoom
<isBusySlot>k__BackingField: 0 <isBusySlot>k__BackingField: 0
<playerId>k__BackingField:
playerName: {fileID: 2083683284} playerName: {fileID: 2083683284}
avatarImage: {fileID: 1612098124} avatarImage: {fileID: 1612098124}
playerAvatarIndex: 0
readyButton: {fileID: 1572726408} readyButton: {fileID: 1572726408}
--- !u!1 &1123789259 --- !u!1 &1123789259
GameObject: GameObject:
...@@ -2474,10 +2470,8 @@ MonoBehaviour: ...@@ -2474,10 +2470,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: Assembly-CSharp::PlayersInLobbyRoom m_EditorClassIdentifier: Assembly-CSharp::PlayersInLobbyRoom
<isBusySlot>k__BackingField: 0 <isBusySlot>k__BackingField: 0
<playerId>k__BackingField:
playerName: {fileID: 555826376} playerName: {fileID: 555826376}
avatarImage: {fileID: 2100342238} avatarImage: {fileID: 2100342238}
playerAvatarIndex: 0
readyButton: {fileID: 1432152172} readyButton: {fileID: 1432152172}
--- !u!1 &1301690832 --- !u!1 &1301690832
GameObject: GameObject:
...@@ -3600,7 +3594,7 @@ MonoBehaviour: ...@@ -3600,7 +3594,7 @@ MonoBehaviour:
- {fileID: 21300000, guid: 750b0c74f15479c4ebecefa612aaf84d, type: 3} - {fileID: 21300000, guid: 750b0c74f15479c4ebecefa612aaf84d, type: 3}
- {fileID: 21300000, guid: f7854f4c75e2fb047bc9c7ec9d23c0f4, type: 3} - {fileID: 21300000, guid: f7854f4c75e2fb047bc9c7ec9d23c0f4, type: 3}
- {fileID: 21300000, guid: 10cef9670e8f9414ab9e32f3480f2da5, type: 3} - {fileID: 21300000, guid: 10cef9670e8f9414ab9e32f3480f2da5, type: 3}
- {fileID: 21300000, guid: 2309ad067460c6141b1fca1d22c118b5, type: 3} - {fileID: 21300000, guid: 2beb18749f99d3f4bb3c31003ac50efb, type: 3}
--- !u!1 &1878458859 --- !u!1 &1878458859
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -3653,10 +3647,8 @@ MonoBehaviour: ...@@ -3653,10 +3647,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: Assembly-CSharp::PlayersInLobbyRoom m_EditorClassIdentifier: Assembly-CSharp::PlayersInLobbyRoom
<isBusySlot>k__BackingField: 0 <isBusySlot>k__BackingField: 0
<playerId>k__BackingField:
playerName: {fileID: 341584730} playerName: {fileID: 341584730}
avatarImage: {fileID: 2069505149} avatarImage: {fileID: 2069505149}
playerAvatarIndex: 0
readyButton: {fileID: 6503186} readyButton: {fileID: 6503186}
--- !u!1 &1887961656 --- !u!1 &1887961656
GameObject: GameObject:
......
using RTLTMPro; using System;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
...@@ -9,7 +8,6 @@ public class AnimalsQuestionGenerator : MonoBehaviour ...@@ -9,7 +8,6 @@ public class AnimalsQuestionGenerator : MonoBehaviour
public List<Enum> randomTags { get; private set; } = new List<Enum>(); public List<Enum> randomTags { get; private set; } = new List<Enum>();
[SerializeField] RTLTextMeshPro QuestionText;
[SerializeField] StringBuilder textBuilder = new StringBuilder(); [SerializeField] StringBuilder textBuilder = new StringBuilder();
string prevQuestion; string prevQuestion;
...@@ -31,8 +29,7 @@ public class AnimalsQuestionGenerator : MonoBehaviour ...@@ -31,8 +29,7 @@ public class AnimalsQuestionGenerator : MonoBehaviour
prevQuestion = currentQuestionText; prevQuestion = currentQuestionText;
currentQuestionText = currentQuestionText.Replace("_", " "); currentQuestionText = currentQuestionText.Replace("_", " ");
QuestionText.text = currentQuestionText; // GameHUD.Instance.Question.Value = currentQuestionText;
} }
private string BuildQuestionString() private string BuildQuestionString()
{ {
......
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Unity.Netcode;
using UnityEngine; using UnityEngine;
using UnityEngine.AI; using UnityEngine.AI;
...@@ -81,6 +82,7 @@ public class AnimalsSpawner : MonoBehaviour ...@@ -81,6 +82,7 @@ public class AnimalsSpawner : MonoBehaviour
{ {
GameObject animalGameobject = Instantiate(animal, hit.position, Quaternion.identity, animalsParent); GameObject animalGameobject = Instantiate(animal, hit.position, Quaternion.identity, animalsParent);
animalGameobject.GetComponent<AnimalDetails>().CorrectAnimal(isCorrect); animalGameobject.GetComponent<AnimalDetails>().CorrectAnimal(isCorrect);
animalGameobject.GetComponent<NetworkObject>().Spawn();
} }
} }
void OnDrawGizmos() void OnDrawGizmos()
......
using System.Collections; using System.Collections;
using TMPro; using TMPro;
using Unity.Netcode;
using UnityEngine; using UnityEngine;
public class GameManager : MonoBehaviour public class GameManager : NetworkBehaviour
{ {
public static GameManager Instance { get; private set; }
[SerializeField] TextMeshProUGUI timerText; [SerializeField] TextMeshProUGUI timerText;
[SerializeField] int startRoundAfter; [SerializeField] int startRoundAfter;
public static GameManager Instance { get; private set; }
[field: SerializeField] public GameSetting GameSetting { get; private set; } [field: SerializeField] public GameSetting GameSetting { get; private set; }
[field: SerializeField] public AnimalsQuestionGenerator AnimalsQuestionGenerator { get; private set; } [field: SerializeField] public AnimalsQuestionGenerator AnimalsQuestionGenerator { get; private set; }
[field: SerializeField] public AnimalsSpawner AnimalsSpawner { get; private set; } [field: SerializeField] public AnimalsSpawner AnimalsSpawner { get; private set; }
...@@ -43,8 +45,11 @@ public class GameManager : MonoBehaviour ...@@ -43,8 +45,11 @@ public class GameManager : MonoBehaviour
} }
public void StartMatch() public void StartMatch()
{ {
AnimalsQuestionGenerator.gameObject.SetActive(true); if (NetworkManager.Singleton.IsHost)
AnimalsSpawner.gameObject.SetActive(true); {
MatchManager.gameObject.SetActive(true); AnimalsQuestionGenerator.gameObject.SetActive(true);
AnimalsSpawner.gameObject.SetActive(true);
MatchManager.gameObject.SetActive(true);
}
} }
} }
using Unity.Netcode;
using UnityEngine;
public class NPCsSpawner : NetworkBehaviour
{
[SerializeField] int maxNPCs;
[SerializeField] NetworkObject NPCsPrefab;
public override void OnNetworkSpawn()
{
if (IsServer)
{
for (int i = 0; i < maxNPCs; i++)
{
NetworkManager.Singleton.SpawnManager.InstantiateAndSpawn(NPCsPrefab);
}
}
}
}
fileFormatVersion: 2
guid: f6c8971a0ea30a442b14a31099b04ac5
\ No newline at end of file
fileFormatVersion: 2
guid: 73560c0e7b97b1946a337e30bc5abc4d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using Unity.Netcode;
using UnityEngine;
public class HandlePlayersConnection : MonoBehaviour
{
[SerializeField] int maxPlayer;
[SerializeField] GameManager gameManagerScript;
[SerializeField] Fade fadeScript;
void Start()
{
StartCoroutine(CheckConnectionPlayers());
}
IEnumerator CheckConnectionPlayers()
{
WaitForSeconds waitForSeconds = new WaitForSeconds(1);
while (NetworkManager.Singleton.ConnectedClients.Count != 2)
{
Debug.Log(NetworkManager.Singleton.ConnectedClients.Count);
yield return waitForSeconds;
}
gameManagerScript.gameObject.SetActive(true);
fadeScript.FadeOut();
}
}
fileFormatVersion: 2
guid: afed2b555e118964bb57dbb6fdb2b8c5
\ No newline at end of file
...@@ -45,7 +45,7 @@ public class CreateLobby : MonoBehaviour ...@@ -45,7 +45,7 @@ public class CreateLobby : MonoBehaviour
lobbyOptions.Data = new Dictionary<string, DataObject> lobbyOptions.Data = new Dictionary<string, DataObject>
{ {
{"AllocationCode",new DataObject(visibility: DataObject.VisibilityOptions.Member,value:"") }, {"AllocationCode",new DataObject(visibility: DataObject.VisibilityOptions.Member,value:"") },
{"NPCsCount", new DataObject(visibility:DataObject.VisibilityOptions.Public,value:"0") } {"NPCsCount", new DataObject(visibility:DataObject.VisibilityOptions.Public,value:"0") },
}; };
return lobbyOptions; return lobbyOptions;
} }
......
...@@ -3,13 +3,12 @@ using System.Collections; ...@@ -3,13 +3,12 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using TMPro; using TMPro;
using Unity.Netcode;
using Unity.Services.Authentication; using Unity.Services.Authentication;
using Unity.Services.Lobbies; using Unity.Services.Lobbies;
using Unity.Services.Lobbies.Models; using Unity.Services.Lobbies.Models;
using Unity.VisualScripting.Antlr3.Runtime.Misc;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using static UnityEngine.LowLevelPhysics2D.PhysicsLayers;
public class LobbyRoom : MonoBehaviour public class LobbyRoom : MonoBehaviour
{ {
...@@ -19,25 +18,22 @@ public class LobbyRoom : MonoBehaviour ...@@ -19,25 +18,22 @@ public class LobbyRoom : MonoBehaviour
[SerializeField] Button exitButton; [SerializeField] Button exitButton;
bool _isOwner; bool _isOwner;
int _currentNPCs;
LobbyHeart _lobbyHeart; LobbyHeart _lobbyHeart;
ILobbyEvents _lobbyEvents; ILobbyEvents _lobbyEvents;
int _currentNPCs;
int _currentReadyPlayer;
void Start() void Start()
{ {
_isOwner = LobbyRequest._currentLobby.HostId == AuthenticationService.Instance.PlayerId; _isOwner = LobbyRequest._currentLobby.HostId == AuthenticationService.Instance.PlayerId;
startButton.interactable = _isOwner;
exitButton.onClick.AddListener(LeaveLobby); exitButton.onClick.AddListener(LeaveLobby);
ShowLobbyCode(); ShowLobbyCode();
_lobbyHeart = FindAnyObjectByType<LobbyHeart>(); _lobbyHeart = FindAnyObjectByType<LobbyHeart>();
RefreshLobby(); RefreshLobby();
SubscribeToLobbyEvent(); SubscribeToLobbyEvent();
} }
...@@ -53,54 +49,115 @@ public class LobbyRoom : MonoBehaviour ...@@ -53,54 +49,115 @@ public class LobbyRoom : MonoBehaviour
_lobbyEvents = await LobbyService.Instance.SubscribeToLobbyEventsAsync(LobbyRequest._currentLobby.Id, lobbyEventCallbacks); _lobbyEvents = await LobbyService.Instance.SubscribeToLobbyEventsAsync(LobbyRequest._currentLobby.Id, lobbyEventCallbacks);
} }
private void LobbyDeleted() private void LobbyDeleted()
{ {
ChangeSceneManager.Instance.ChangeToMainmenuScene(); ChangeSceneManager.Instance.ChangeToMainmenuScene();
} }
private void DataChanged(Dictionary<string, ChangedOrRemovedLobbyValue<DataObject>> obj) private void DataChanged(Dictionary<string, ChangedOrRemovedLobbyValue<DataObject>> obj)
{ {
RefreshLobby(); RefreshLobby();
RefreshNPCs();
Debug.Log("DataChanged");
} }
private void PlayerDataChanged(Dictionary<int, Dictionary<string, ChangedOrRemovedLobbyValue<PlayerDataObject>>> obj) private void PlayerDataChanged(Dictionary<int, Dictionary<string, ChangedOrRemovedLobbyValue<PlayerDataObject>>> obj)
{ {
RefreshLobby(); RefreshLobby();
Debug.Log("PlayerDataChanged");
} }
private void PlayerJoined(List<LobbyPlayerJoined> playersObj) private void PlayerJoined(List<LobbyPlayerJoined> playersObj)
{ {
RefreshLobby(); RefreshLobby();
Debug.Log("PlayerJoined");
} }
private void PlayerLeft(List<int> playerIndices) private void PlayerLeft(List<int> playerIndices)
{ {
RefreshLobby(); RefreshLobby();
Debug.Log("PlayerLeft");
}
private void RefreshNPCs()
{
try
{
int npcCount = 0;
npcCount = int.Parse(LobbyRequest._currentLobby.Data["NPCsCount"].Value);
_currentNPCs = npcCount;
}
catch (Exception ex)
{
Debug.LogError($"Error refreshing NPCs: {ex}");
}
} }
private void ShowLobbyCode() private void ShowLobbyCode()
{ {
lobbyCode.text = $"Room Code: {PlayerPrefs.GetString("JoinCode")}"; lobbyCode.text = $"Room Code: {PlayerPrefs.GetString("JoinCode")}";
} }
async void CheckPlayerCount()
async void AddNPCs(int count) {
if(_currentNPCs + _currentReadyPlayer == 4 && _isOwner)
{
startButton.interactable = true;
startButton.image.color = Color.green;
await StartAllocate();
}
}
async Task StartAllocate()
{ {
string AllocationCode = await AllocationRequest.Create();
UpdateLobbyOptions updateLobbyOptions = new UpdateLobbyOptions() UpdateLobbyOptions updateLobbyOptions = new UpdateLobbyOptions()
{ {
IsLocked = true,
Data = new Dictionary<string, DataObject> Data = new Dictionary<string, DataObject>
{ {
{"NPCsCount", new DataObject(visibility: DataObject.VisibilityOptions.Public, value: _currentNPCs.ToString())} {"AllocationCode", new DataObject(visibility: DataObject.VisibilityOptions.Member, value: AllocationCode)},
} }
}; };
await LobbyService.Instance.UpdateLobbyAsync(LobbyRequest._currentLobby.Id, updateLobbyOptions); await LobbyRequest.UpdateLobby(updateLobbyOptions);
} }
IEnumerator StartGameTimer() // Excute This to all client after
async void StartGame()
{ {
Debug.Log("Starting Game"); int timer = 4;
UpdateLobbyOptions updateLobbyOptions = new UpdateLobbyOptions() while (timer > 0)
{ {
IsLocked = true timer--;
}; yield return new WaitForSeconds(1);
await LobbyService.Instance.UpdateLobbyAsync(LobbyRequest._currentLobby.Id, updateLobbyOptions); }
FadeWithText.Instance.ShowMessage("جاري الدخول...", false);
if (_isOwner)
{
NetworkManager.Singleton.StartHost();
NetworkManager.Singleton.OnClientConnectedCallback += PlayerConnection;
}
else
{
NetworkManager.Singleton.StartClient();
}
}
private void OnDestroy()
{
if(NetworkManager.Singleton != null)
{
NetworkManager.Singleton.OnClientConnectedCallback -= PlayerConnection;
}
}
private void PlayerConnection(ulong obj)
{
if(NetworkManager.Singleton.ConnectedClients.Count == _currentReadyPlayer)
{
NetworkManager.Singleton.SceneManager.LoadScene("Game",UnityEngine.SceneManagement.LoadSceneMode.Single);
}
} }
private async void RefreshLobby() private async void RefreshLobby()
...@@ -115,6 +172,29 @@ public class LobbyRoom : MonoBehaviour ...@@ -115,6 +172,29 @@ public class LobbyRoom : MonoBehaviour
{ {
AddPlayerToSlot(player); AddPlayerToSlot(player);
} }
int npcCount = 0;
if (lobby.Data.ContainsKey("NPCsCount"))
{
npcCount = int.Parse(lobby.Data["NPCsCount"].Value);
Debug.Log(npcCount);
}
foreach (PlayersInLobbyRoom slots in playersSlot)
{
slots.SetIsOwner(_isOwner);
}
AddNPCsToSlots(npcCount);
foreach (PlayersInLobbyRoom slots in playersSlot)
{
slots.SetNPC(_isOwner);
}
}
catch (LobbyServiceException ex)
{
Debug.LogException(ex);
} }
catch (Exception e) catch (Exception e)
{ {
...@@ -129,23 +209,38 @@ public class LobbyRoom : MonoBehaviour ...@@ -129,23 +209,38 @@ public class LobbyRoom : MonoBehaviour
slot.Clear(); slot.Clear();
} }
} }
void AddPlayerToSlot(Player player) void AddPlayerToSlot(Player player)
{ {
string playerName = player.Data["Name"].Value; string playerName = player.Data["Name"].Value;
string avatarIndex = player.Data["AvatarIndex"].Value; string avatarIndex = player.Data["AvatarIndex"].Value;
string playerId = player.Id; string playerId = player.Id;
string isReady = player.Data["IsReady"].Value;
foreach (PlayersInLobbyRoom slots in playersSlot) foreach (PlayersInLobbyRoom slots in playersSlot)
{ {
if (!slots.isBusySlot) if (!slots.isBusySlot)
{ {
slots.Init(playerName, avatarIndex, playerId, _isOwner); slots.Init(playerName, avatarIndex, playerId, isReady);
break; break;
} }
} }
} }
void AddNPCsToSlots(int npcCount)
{
int addedNPCs = 0;
foreach (PlayersInLobbyRoom slot in playersSlot)
{
if (!slot.isBusySlot && addedNPCs < npcCount)
{
slot.InitializeAsNPC();
addedNPCs++;
}
}
}
private void LeaveLobby() private void LeaveLobby()
{ {
CleanupLobby(); CleanupLobby();
...@@ -155,6 +250,7 @@ public class LobbyRoom : MonoBehaviour ...@@ -155,6 +250,7 @@ public class LobbyRoom : MonoBehaviour
private void OnApplicationQuit() private void OnApplicationQuit()
{ {
CleanupLobby(); CleanupLobby();
Debug.Log("OnApplicationQuit");
} }
void CleanupLobby() void CleanupLobby()
......
using RTLTMPro;
using System;
using Unity.Netcode;
using UnityEngine;
public class GameHUD : NetworkBehaviour
{
public static GameHUD Instance;
[SerializeField] RTLTextMeshPro QuestionText;
[field: SerializeField] public NetworkVariable<string> Question = new NetworkVariable<string>(readPerm: NetworkVariableReadPermission.Everyone, writePerm: NetworkVariableWritePermission.Server);
private void Awake()
{
if (Instance == null)
Instance = this;
else
Destroy(this);
}
public override void OnNetworkSpawn()
{
Question.OnValueChanged += DisplayQuestion;
}
private void DisplayQuestion(string previousValue, string newValue)
{
QuestionText.text = newValue;
}
public override void OnNetworkDespawn()
{
Question.OnValueChanged -= DisplayQuestion;
}
}
fileFormatVersion: 2
guid: 07d1addb092daf0408f5c0c96b4de5f8
\ No newline at end of file
using System; using System;
using System.Threading.Tasks;
using TMPro; using TMPro;
using Unity.Services.Authentication; using Unity.Services.Authentication;
using Unity.Services.Lobbies;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using System.Collections.Generic;
using Unity.Services.Lobbies.Models;
public class PlayersInLobbyRoom : MonoBehaviour public class PlayersInLobbyRoom : MonoBehaviour
{ {
[field: SerializeField] public bool isBusySlot { get; private set; } [field: SerializeField] public bool isBusySlot { get; private set; }
[field: SerializeField] public string playerId { get; private set; }
[SerializeField] TextMeshProUGUI playerName; [SerializeField] TextMeshProUGUI playerName;
[SerializeField] Image avatarImage; [SerializeField] Image avatarImage;
[SerializeField] int playerAvatarIndex;
[SerializeField] Button readyButton; [SerializeField] Button readyButton;
public void Init(string name, string avatarIndex, string playerId,bool isOwner) string _playerId;
bool _isNPC;
bool _isOwner;
private void Start()
{ {
ChangeAvatar(int.Parse(avatarIndex)); readyButton.onClick.AddListener(Ready);
}
playerName.text = name; public void SetIsOwner(bool isOwner)
{
_isOwner = isOwner;
}
private async void Ready()
{
if (isBusySlot && !_isNPC)
{
UpdatePlayerOptions updatePlayerOptions = new UpdatePlayerOptions();
updatePlayerOptions.Data = new Dictionary<string, PlayerDataObject>
{
{"IsReady", new PlayerDataObject(PlayerDataObject.VisibilityOptions.Member, "True")}
};
await LobbyRequest.UpdatePlayerData(_playerId, updatePlayerOptions);
}
else if (!isBusySlot && !_isNPC)
{
await AddNPC();
}
else if (_isNPC && _isOwner)
{
await RemoveNPC();
}
}
async Task AddNPC()
{
try
{
UpdateLobbyOptions updateLobbyOptions = new UpdateLobbyOptions()
{
Data = new Dictionary<string, DataObject>
{
{"NPCsCount", new DataObject(visibility: DataObject.VisibilityOptions.Public, value: (GetCurrentNPCCount() + 1).ToString())}
}
};
await LobbyRequest.UpdateLobby(updateLobbyOptions);
InitializeAsNPC();
}
catch (Exception ex)
{
Debug.LogException(ex);
}
}
async Task RemoveNPC()
{
try
{
int currentCount = GetCurrentNPCCount();
int newCount = Mathf.Max(0, currentCount - 1);
UpdateLobbyOptions updateLobbyOptions = new UpdateLobbyOptions()
{
Data = new Dictionary<string, DataObject>
{
{"NPCsCount", new DataObject(visibility: DataObject.VisibilityOptions.Public, value: newCount.ToString())}
}
};
await LobbyRequest.UpdateLobby(updateLobbyOptions);
Clear();
Debug.Log("NPC Removed Successfully");
}
catch (Exception ex)
{
Debug.LogError($"Error removing NPC: {ex}");
}
}
public void InitializeAsNPC()
{
_isNPC = true;
isBusySlot = true; isBusySlot = true;
ChangeAvatar(3);
playerName.text = "NPC#" + UnityEngine.Random.Range(1000, 9999);
readyButton.interactable = _isOwner;
readyButton.image.color = Color.red;
readyButton.GetComponentInChildren<TextMeshProUGUI>().text = "Remove";
readyButton.GetComponentInChildren<TextMeshProUGUI>().color = Color.white;
}
this.playerId = playerId; public void Init(string name, string avatarIndex, string playerId, string isReady)
{
_isNPC = false;
ChangeAvatar(int.Parse(avatarIndex));
playerName.text = name;
isBusySlot = true;
this._playerId = playerId;
readyButton.interactable = playerId == AuthenticationService.Instance.PlayerId;
readyButton.GetComponentInChildren<TextMeshProUGUI>().text = "Ready";
if (playerId == null) if (isReady == "True")
{ {
readyButton.interactable = true; readyButton.GetComponentInChildren<TextMeshProUGUI>().text = "Is Ready";
readyButton.GetComponentInChildren<TextMeshProUGUI>().text = "Add NPCs"; readyButton.interactable = false;
isBusySlot = false; readyButton.image.color = Color.green;
} }
else }
public void SetNPC(bool isOwner)
{
if (isOwner && !isBusySlot && !_isNPC)
{ {
readyButton.interactable = playerId == AuthenticationService.Instance.PlayerId; readyButton.interactable = true;
readyButton.GetComponentInChildren<TextMeshProUGUI>().text = "Ready"; readyButton.GetComponentInChildren<TextMeshProUGUI>().text = "Add NPCs";
} }
} }
public void Clear() public void Clear()
{ {
isBusySlot = false; isBusySlot = false;
playerId = null; _isNPC = false;
playerName.text = " "; _playerId = "";
playerName.text = "";
ChangeAvatar(0); ChangeAvatar(0);
readyButton.interactable = false; readyButton.interactable = false;
readyButton.GetComponentInChildren<TextMeshProUGUI>().text = "";
readyButton.GetComponentInChildren<TextMeshProUGUI>().color = Color.black;
readyButton.image.color = Color.white;
} }
void ChangeAvatar(int index) void ChangeAvatar(int index)
{ {
avatarImage.sprite = GetComponentInParent<AvatarMenu>().GetSpriteByIndex(index); avatarImage.sprite = GetComponentInParent<AvatarMenu>().GetSpriteByIndex(index);
} }
}
private int GetCurrentNPCCount()
{
try
{
if (LobbyRequest._currentLobby.Data.ContainsKey("NPCsCount"))
{
return int.Parse(LobbyRequest._currentLobby.Data["NPCsCount"].Value);
}
}
catch
{
return 0;
}
return 0;
}
}
\ No newline at end of file
...@@ -25,10 +25,6 @@ public static class AllocationRequest ...@@ -25,10 +25,6 @@ public static class AllocationRequest
{ {
Debug.LogException(ex); Debug.LogException(ex);
} }
return null; return string.Empty;
}
public static Allocation GetCurrentAllocation()
{
return _allocation;
} }
} }
...@@ -142,6 +142,36 @@ public static class LobbyRequest ...@@ -142,6 +142,36 @@ public static class LobbyRequest
} }
return false; return false;
} }
public static async Task UpdatePlayerData(string playerId, UpdatePlayerOptions updatePlayerOptions)
{
try
{
await LobbyService.Instance.UpdatePlayerAsync(_currentLobby.Id, playerId, updatePlayerOptions);
}
catch (LobbyServiceException ex)
{
Debug.LogException(ex);
}
catch (Exception ex)
{
Debug.LogException(ex);
}
}
public static async Task UpdateLobby(UpdateLobbyOptions updateLobbyOptions)
{
try
{
await LobbyService.Instance.UpdateLobbyAsync(_currentLobby.Id, updateLobbyOptions);
}
catch (LobbyServiceException ex)
{
Debug.LogException(ex);
}
catch (Exception ex)
{
Debug.LogException(ex);
}
}
static Player SetPlayerData() static Player SetPlayerData()
{ {
Player player = new Player( Player player = new Player(
......
...@@ -8,7 +8,6 @@ using UnityEngine; ...@@ -8,7 +8,6 @@ using UnityEngine;
public class PlayerDetails : NetworkBehaviour public class PlayerDetails : NetworkBehaviour
{ {
public NetworkVariable<FixedString32Bytes> PlayerName = new NetworkVariable<FixedString32Bytes>("Unknown",NetworkVariableReadPermission.Everyone,NetworkVariableWritePermission.Owner); public NetworkVariable<FixedString32Bytes> PlayerName = new NetworkVariable<FixedString32Bytes>("Unknown",NetworkVariableReadPermission.Everyone,NetworkVariableWritePermission.Owner);
[field: SerializeField] public Sprite PlayerImage { get; private set; }
[SerializeField] RTLTextMeshPro nameText; [SerializeField] RTLTextMeshPro nameText;
...@@ -18,7 +17,7 @@ public class PlayerDetails : NetworkBehaviour ...@@ -18,7 +17,7 @@ public class PlayerDetails : NetworkBehaviour
if (IsOwner) if (IsOwner)
{ {
PlayerName.Value = new FixedString32Bytes(PlayerPrefs.GetString("PlayerName")); PlayerName.Value = new FixedString32Bytes(PlayerPrefs.GetString("PlayerName","Unknown"));
} }
onNameChanged(default, PlayerName.Value); onNameChanged(default, PlayerName.Value);
......
...@@ -34,6 +34,7 @@ public class PlayerMovement : NetworkBehaviour ...@@ -34,6 +34,7 @@ public class PlayerMovement : NetworkBehaviour
else else
{ {
cam.gameObject.GetComponent<CinemachineCamera>().enabled = false; cam.gameObject.GetComponent<CinemachineCamera>().enabled = false;
GetComponent<PlayerFire>().enabled = false;
enabled = false; enabled = false;
} }
} }
......
using Unity.Netcode; using System;
using Unity.Netcode;
using UnityEngine; using UnityEngine;
public class Score : NetworkBehaviour public class Score : NetworkBehaviour
{ {
int _score; [field: SerializeField] public NetworkVariable<int> _score = new NetworkVariable<int>(readPerm:NetworkVariableReadPermission.Everyone,writePerm:NetworkVariableWritePermission.Owner);
RaycastWeapon _raycastWeapon; RaycastWeapon _raycastWeapon;
private void OnEnable() private void OnEnable()
...@@ -11,22 +12,30 @@ public class Score : NetworkBehaviour ...@@ -11,22 +12,30 @@ public class Score : NetworkBehaviour
_raycastWeapon = GetComponent<RaycastWeapon>(); _raycastWeapon = GetComponent<RaycastWeapon>();
_raycastWeapon.onAnimalDie += AnimalDie; _raycastWeapon.onAnimalDie += AnimalDie;
} }
public override void OnNetworkSpawn()
{
_score.OnValueChanged += OnScoreChanged;
}
public override void OnNetworkDespawn()
{
_score.OnValueChanged -= OnScoreChanged;
private void OnDisable() }
private void OnScoreChanged(int previousValue, int newValue)
{ {
_raycastWeapon.onAnimalDie -= AnimalDie; Debug.Log(newValue);
} }
public override void OnNetworkSpawn()
private void OnDisable()
{ {
if (IsOwner) _raycastWeapon.onAnimalDie -= AnimalDie;
{
// GameManager.Instance.ScoreManager.AddPlayersServerRpc(NetworkManager.Singleton.LocalClientId, PlayerPrefs.GetString("PlayerName"));
}
} }
private void AnimalDie(int score) private void AnimalDie(int score)
{ {
_score += score; int newScore = _score.Value + score;
_score = Mathf.Max(0, _score); newScore = Mathf.Max(0, newScore);
_score.Value = newScore;
AddScoreToLeaderboard(); AddScoreToLeaderboard();
} }
......
using Unity.Netcode;
using UnityEngine;
using UnityEngine.UI;
public class StartConnection : MonoBehaviour
{
[SerializeField] Button startHost;
[SerializeField] Button startClient;
void Start()
{
startHost.onClick.AddListener(() => { NetworkManager.Singleton.StartHost(); });
startClient.onClick.AddListener(() => { NetworkManager.Singleton.StartClient(); });
}
}
fileFormatVersion: 2
guid: 1f7bc60033b1d164881bfea26ffc8732
\ No newline at end of file
...@@ -25,7 +25,7 @@ EditorSettings: ...@@ -25,7 +25,7 @@ EditorSettings:
m_AsyncShaderCompilation: 1 m_AsyncShaderCompilation: 1
m_PrefabModeAllowAutoSave: 1 m_PrefabModeAllowAutoSave: 1
m_EnterPlayModeOptionsEnabled: 1 m_EnterPlayModeOptionsEnabled: 1
m_EnterPlayModeOptions: 0 m_EnterPlayModeOptions: 3
m_GameObjectNamingDigits: 1 m_GameObjectNamingDigits: 1
m_GameObjectNamingScheme: 0 m_GameObjectNamingScheme: 0
m_AssetNamingUsesSpace: 1 m_AssetNamingUsesSpace: 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment