diff --git a/Assets/DefaultNetworkPrefabs.asset b/Assets/DefaultNetworkPrefabs.asset new file mode 100644 index 0000000..54d1fb8 --- /dev/null +++ b/Assets/DefaultNetworkPrefabs.asset @@ -0,0 +1,81 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e651dbb3fbac04af2b8f5abf007ddc23, type: 3} + m_Name: DefaultNetworkPrefabs + m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkPrefabsList + IsDefault: 1 + List: + - Override: 0 + Prefab: {fileID: 2473992278589500093, guid: fe3685eff459f8b4d8b8d0786aad07de, type: 3} + SourcePrefabToOverride: {fileID: 0} + SourceHashToOverride: 0 + OverridingTargetPrefab: {fileID: 0} + - Override: 0 + Prefab: {fileID: 7327242023390354019, guid: 9f0adbb07b3928847861b8bf306ca412, type: 3} + SourcePrefabToOverride: {fileID: 0} + SourceHashToOverride: 0 + OverridingTargetPrefab: {fileID: 0} + - Override: 0 + Prefab: {fileID: 7327242023390354019, guid: 773f85c1a4ec87a4da4cbbb9d2e730cd, type: 3} + SourcePrefabToOverride: {fileID: 0} + SourceHashToOverride: 0 + OverridingTargetPrefab: {fileID: 0} + - Override: 0 + Prefab: {fileID: 7327242023390354019, guid: 77ee51d7bba39bb4ea1c89b16e1052ba, type: 3} + SourcePrefabToOverride: {fileID: 0} + SourceHashToOverride: 0 + OverridingTargetPrefab: {fileID: 0} + - Override: 0 + Prefab: {fileID: 7327242023390354019, guid: 898d65cff675d304a9eb583546d3312b, type: 3} + SourcePrefabToOverride: {fileID: 0} + SourceHashToOverride: 0 + OverridingTargetPrefab: {fileID: 0} + - Override: 0 + Prefab: {fileID: 7327242023390354019, guid: 7d362c5c1b34c2b4e901294618e6c3e8, type: 3} + SourcePrefabToOverride: {fileID: 0} + SourceHashToOverride: 0 + OverridingTargetPrefab: {fileID: 0} + - Override: 0 + Prefab: {fileID: 7327242023390354019, guid: 2c280b2ae26e7364b8afee740b7cc712, type: 3} + SourcePrefabToOverride: {fileID: 0} + SourceHashToOverride: 0 + OverridingTargetPrefab: {fileID: 0} + - Override: 0 + Prefab: {fileID: 7327242023390354019, guid: 1a0743e23b3b9094bb86849376c9f73c, type: 3} + SourcePrefabToOverride: {fileID: 0} + SourceHashToOverride: 0 + OverridingTargetPrefab: {fileID: 0} + - Override: 0 + Prefab: {fileID: 7327242023390354019, guid: fc47abc0080971d4fa7cf22f661f1b98, type: 3} + SourcePrefabToOverride: {fileID: 0} + SourceHashToOverride: 0 + OverridingTargetPrefab: {fileID: 0} + - Override: 0 + Prefab: {fileID: 7817822323996939414, guid: 48bf40d31e903d34f9469451d7de06dd, type: 3} + SourcePrefabToOverride: {fileID: 0} + SourceHashToOverride: 0 + OverridingTargetPrefab: {fileID: 0} + - Override: 0 + Prefab: {fileID: 7817822323996939414, guid: 532bea89bbc1d2245b65a9c22749711a, type: 3} + SourcePrefabToOverride: {fileID: 0} + SourceHashToOverride: 0 + OverridingTargetPrefab: {fileID: 0} + - Override: 0 + Prefab: {fileID: 1126366023313988, guid: a4e5400b711cb57478dcf41916935a7e, type: 3} + SourcePrefabToOverride: {fileID: 0} + SourceHashToOverride: 0 + OverridingTargetPrefab: {fileID: 0} + - Override: 0 + Prefab: {fileID: 989066657509100432, guid: dbb1cfcb3d9e3844e8d9cdf09b0a1660, type: 3} + SourcePrefabToOverride: {fileID: 0} + SourceHashToOverride: 0 + OverridingTargetPrefab: {fileID: 0} diff --git a/Assets/DefaultNetworkPrefabs.asset.meta b/Assets/DefaultNetworkPrefabs.asset.meta new file mode 100644 index 0000000..2473e64 --- /dev/null +++ b/Assets/DefaultNetworkPrefabs.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4ae00697a21204b49b3f63483dfc711f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/InputSystem_Actions.cs b/Assets/InputSystem_Actions.cs index 87c7eb2..020b19e 100644 --- a/Assets/InputSystem_Actions.cs +++ b/Assets/InputSystem_Actions.cs @@ -199,6 +199,60 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable ""processors"": """", ""interactions"": """", ""initialStateCheck"": false + }, + { + ""name"": ""Select1"", + ""type"": ""Button"", + ""id"": ""9514c5c0-0f52-4aad-9190-8eaa582582af"", + ""expectedControlType"": """", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false + }, + { + ""name"": ""Select2"", + ""type"": ""Button"", + ""id"": ""1f9606a7-fe64-4d40-8e7d-f52a60d8586e"", + ""expectedControlType"": """", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false + }, + { + ""name"": ""Select3"", + ""type"": ""Button"", + ""id"": ""7ab3f504-268a-4863-9e06-9cd4d229b811"", + ""expectedControlType"": """", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false + }, + { + ""name"": ""Select4"", + ""type"": ""Button"", + ""id"": ""31222006-ca06-4d72-9fb2-47b3ba098284"", + ""expectedControlType"": """", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false + }, + { + ""name"": ""Select5"", + ""type"": ""Button"", + ""id"": ""7c26ea04-baab-4928-9fdb-21e56786479f"", + ""expectedControlType"": """", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false + }, + { + ""name"": ""Select6"", + ""type"": ""Button"", + ""id"": ""131d2ab9-c3a9-4ff2-9c1a-349723005f20"", + ""expectedControlType"": """", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false } ], ""bindings"": [ @@ -575,6 +629,72 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable ""action"": ""Attack"", ""isComposite"": false, ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""aa3b572f-6e1b-42d3-8888-9a5ba4e40e8e"", + ""path"": ""/1"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Keyboard&Mouse"", + ""action"": ""Select1"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""d9400340-cb26-41fb-ac57-b2396f92fa02"", + ""path"": ""/2"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Keyboard&Mouse"", + ""action"": ""Select2"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""b4e51cdc-c9f0-49e9-a57c-114e99e6cda7"", + ""path"": ""/3"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Keyboard&Mouse"", + ""action"": ""Select3"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""fc5a035c-c7cf-46ed-b283-881d42435491"", + ""path"": ""/4"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Keyboard&Mouse"", + ""action"": ""Select4"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""68ef307e-2425-4ef1-8f21-ec7b3018135c"", + ""path"": ""/5"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Keyboard&Mouse"", + ""action"": ""Select5"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""f8d7c66f-bd8c-4351-b3d1-4931b17e703c"", + ""path"": ""/6"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Keyboard&Mouse"", + ""action"": ""Select6"", + ""isComposite"": false, + ""isPartOfComposite"": false } ] }, @@ -1172,6 +1292,12 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable m_Player_Build = m_Player.FindAction("Build", throwIfNotFound: true); m_Player_Cancel = m_Player.FindAction("Cancel", throwIfNotFound: true); m_Player_Attack = m_Player.FindAction("Attack", throwIfNotFound: true); + m_Player_Select1 = m_Player.FindAction("Select1", throwIfNotFound: true); + m_Player_Select2 = m_Player.FindAction("Select2", throwIfNotFound: true); + m_Player_Select3 = m_Player.FindAction("Select3", throwIfNotFound: true); + m_Player_Select4 = m_Player.FindAction("Select4", throwIfNotFound: true); + m_Player_Select5 = m_Player.FindAction("Select5", throwIfNotFound: true); + m_Player_Select6 = m_Player.FindAction("Select6", throwIfNotFound: true); // UI m_UI = asset.FindActionMap("UI", throwIfNotFound: true); m_UI_Navigate = m_UI.FindAction("Navigate", throwIfNotFound: true); @@ -1277,6 +1403,12 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable private readonly InputAction m_Player_Build; private readonly InputAction m_Player_Cancel; private readonly InputAction m_Player_Attack; + private readonly InputAction m_Player_Select1; + private readonly InputAction m_Player_Select2; + private readonly InputAction m_Player_Select3; + private readonly InputAction m_Player_Select4; + private readonly InputAction m_Player_Select5; + private readonly InputAction m_Player_Select6; /// /// Provides access to input actions defined in input action map "Player". /// @@ -1337,6 +1469,30 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable /// public InputAction @Attack => m_Wrapper.m_Player_Attack; /// + /// Provides access to the underlying input action "Player/Select1". + /// + public InputAction @Select1 => m_Wrapper.m_Player_Select1; + /// + /// Provides access to the underlying input action "Player/Select2". + /// + public InputAction @Select2 => m_Wrapper.m_Player_Select2; + /// + /// Provides access to the underlying input action "Player/Select3". + /// + public InputAction @Select3 => m_Wrapper.m_Player_Select3; + /// + /// Provides access to the underlying input action "Player/Select4". + /// + public InputAction @Select4 => m_Wrapper.m_Player_Select4; + /// + /// Provides access to the underlying input action "Player/Select5". + /// + public InputAction @Select5 => m_Wrapper.m_Player_Select5; + /// + /// Provides access to the underlying input action "Player/Select6". + /// + public InputAction @Select6 => m_Wrapper.m_Player_Select6; + /// /// Provides access to the underlying input action map instance. /// public InputActionMap Get() { return m_Wrapper.m_Player; } @@ -1398,6 +1554,24 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable @Attack.started += instance.OnAttack; @Attack.performed += instance.OnAttack; @Attack.canceled += instance.OnAttack; + @Select1.started += instance.OnSelect1; + @Select1.performed += instance.OnSelect1; + @Select1.canceled += instance.OnSelect1; + @Select2.started += instance.OnSelect2; + @Select2.performed += instance.OnSelect2; + @Select2.canceled += instance.OnSelect2; + @Select3.started += instance.OnSelect3; + @Select3.performed += instance.OnSelect3; + @Select3.canceled += instance.OnSelect3; + @Select4.started += instance.OnSelect4; + @Select4.performed += instance.OnSelect4; + @Select4.canceled += instance.OnSelect4; + @Select5.started += instance.OnSelect5; + @Select5.performed += instance.OnSelect5; + @Select5.canceled += instance.OnSelect5; + @Select6.started += instance.OnSelect6; + @Select6.performed += instance.OnSelect6; + @Select6.canceled += instance.OnSelect6; } /// @@ -1445,6 +1619,24 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable @Attack.started -= instance.OnAttack; @Attack.performed -= instance.OnAttack; @Attack.canceled -= instance.OnAttack; + @Select1.started -= instance.OnSelect1; + @Select1.performed -= instance.OnSelect1; + @Select1.canceled -= instance.OnSelect1; + @Select2.started -= instance.OnSelect2; + @Select2.performed -= instance.OnSelect2; + @Select2.canceled -= instance.OnSelect2; + @Select3.started -= instance.OnSelect3; + @Select3.performed -= instance.OnSelect3; + @Select3.canceled -= instance.OnSelect3; + @Select4.started -= instance.OnSelect4; + @Select4.performed -= instance.OnSelect4; + @Select4.canceled -= instance.OnSelect4; + @Select5.started -= instance.OnSelect5; + @Select5.performed -= instance.OnSelect5; + @Select5.canceled -= instance.OnSelect5; + @Select6.started -= instance.OnSelect6; + @Select6.performed -= instance.OnSelect6; + @Select6.canceled -= instance.OnSelect6; } /// @@ -1829,6 +2021,48 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable /// /// void OnAttack(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "Select1" is either , or . + /// + /// + /// + /// + void OnSelect1(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "Select2" is either , or . + /// + /// + /// + /// + void OnSelect2(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "Select3" is either , or . + /// + /// + /// + /// + void OnSelect3(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "Select4" is either , or . + /// + /// + /// + /// + void OnSelect4(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "Select5" is either , or . + /// + /// + /// + /// + void OnSelect5(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "Select6" is either , or . + /// + /// + /// + /// + void OnSelect6(InputAction.CallbackContext context); } /// /// Interface to implement callback methods for all input action callbacks associated with input actions defined by "UI" which allows adding and removing callbacks. diff --git a/Assets/InputSystem_Actions.inputactions b/Assets/InputSystem_Actions.inputactions index 8fe459c..baa6142 100644 --- a/Assets/InputSystem_Actions.inputactions +++ b/Assets/InputSystem_Actions.inputactions @@ -113,6 +113,60 @@ "processors": "", "interactions": "", "initialStateCheck": false + }, + { + "name": "Select1", + "type": "Button", + "id": "9514c5c0-0f52-4aad-9190-8eaa582582af", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "Select2", + "type": "Button", + "id": "1f9606a7-fe64-4d40-8e7d-f52a60d8586e", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "Select3", + "type": "Button", + "id": "7ab3f504-268a-4863-9e06-9cd4d229b811", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "Select4", + "type": "Button", + "id": "31222006-ca06-4d72-9fb2-47b3ba098284", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "Select5", + "type": "Button", + "id": "7c26ea04-baab-4928-9fdb-21e56786479f", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "Select6", + "type": "Button", + "id": "131d2ab9-c3a9-4ff2-9c1a-349723005f20", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false } ], "bindings": [ @@ -489,6 +543,72 @@ "action": "Attack", "isComposite": false, "isPartOfComposite": false + }, + { + "name": "", + "id": "aa3b572f-6e1b-42d3-8888-9a5ba4e40e8e", + "path": "/1", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Select1", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "d9400340-cb26-41fb-ac57-b2396f92fa02", + "path": "/2", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Select2", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "b4e51cdc-c9f0-49e9-a57c-114e99e6cda7", + "path": "/3", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Select3", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "fc5a035c-c7cf-46ed-b283-881d42435491", + "path": "/4", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Select4", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "68ef307e-2425-4ef1-8f21-ec7b3018135c", + "path": "/5", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Select5", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "f8d7c66f-bd8c-4351-b3d1-4931b17e703c", + "path": "/6", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Select6", + "isComposite": false, + "isPartOfComposite": false } ] }, diff --git a/Assets/Prefabs/Arrow Tower Ghost.prefab b/Assets/Prefabs/Arrow Tower Ghost.prefab index 58f5600..4b3f02a 100644 --- a/Assets/Prefabs/Arrow Tower Ghost.prefab +++ b/Assets/Prefabs/Arrow Tower Ghost.prefab @@ -43,6 +43,7 @@ GameObject: - component: {fileID: 3298109745345281552} - component: {fileID: 6188798004264357103} - component: {fileID: 290526633059153387} + - component: {fileID: 8513736919308221023} m_Layer: 0 m_Name: Arrow Tower Ghost m_TagString: Untagged @@ -96,6 +97,31 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: Assembly-CSharp::TowerRangeOverlay _rangeSprite: {fileID: 7568889303457012890} +--- !u!114 &8513736919308221023 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7327242023390354019} + 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!1 &7568889303457012890 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/Arrow Tower.prefab b/Assets/Prefabs/Arrow Tower.prefab index 0d48daf..e5192d2 100644 --- a/Assets/Prefabs/Arrow Tower.prefab +++ b/Assets/Prefabs/Arrow Tower.prefab @@ -43,6 +43,7 @@ GameObject: - component: {fileID: 3298109745345281552} - component: {fileID: 7462498580092677868} - component: {fileID: 1517820236960220551} + - component: {fileID: 6601208044127032319} m_Layer: 0 m_Name: Arrow Tower m_TagString: Untagged @@ -96,6 +97,31 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: Assembly-CSharp::TowerRangeOverlay _rangeSprite: {fileID: 7568889303457012890} +--- !u!114 &6601208044127032319 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7327242023390354019} + 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!1 &7568889303457012890 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/Cannon Tower Ghost.prefab b/Assets/Prefabs/Cannon Tower Ghost.prefab index 644880b..a5b658e 100644 --- a/Assets/Prefabs/Cannon Tower Ghost.prefab +++ b/Assets/Prefabs/Cannon Tower Ghost.prefab @@ -134,6 +134,7 @@ GameObject: - component: {fileID: 3298109745345281552} - component: {fileID: 4187895223238873757} - component: {fileID: 526489356863145761} + - component: {fileID: 5000208809097597662} m_Layer: 0 m_Name: Cannon Tower Ghost m_TagString: Untagged @@ -187,6 +188,31 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: Assembly-CSharp::TowerRangeOverlay _rangeSprite: {fileID: 6461655080141397273} +--- !u!114 &5000208809097597662 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7327242023390354019} + 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!1001 &1765420783448711887 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/Cannon Tower.prefab b/Assets/Prefabs/Cannon Tower.prefab index a8a44f3..628e83d 100644 --- a/Assets/Prefabs/Cannon Tower.prefab +++ b/Assets/Prefabs/Cannon Tower.prefab @@ -134,6 +134,7 @@ GameObject: - component: {fileID: 3298109745345281552} - component: {fileID: 7026385046173358401} - component: {fileID: 8240545813658300300} + - component: {fileID: 4839979934980422411} m_Layer: 0 m_Name: Cannon Tower m_TagString: Untagged @@ -187,6 +188,31 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: Assembly-CSharp::TowerRangeOverlay _rangeSprite: {fileID: 6461655080141397273} +--- !u!114 &4839979934980422411 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7327242023390354019} + 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!1001 &2210915670374294698 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/ConstructionSite.prefab b/Assets/Prefabs/ConstructionSite.prefab index 043ea26..f85c0c9 100644 --- a/Assets/Prefabs/ConstructionSite.prefab +++ b/Assets/Prefabs/ConstructionSite.prefab @@ -10,6 +10,7 @@ GameObject: m_Component: - component: {fileID: 3298109745345281552} - component: {fileID: 7009177059939730184} + - component: {fileID: 3785165941058020905} - component: {fileID: 3261695852906763218} - component: {fileID: 1331949327699177778} m_Layer: 8 @@ -56,6 +57,31 @@ BoxCollider: serializedVersion: 3 m_Size: {x: 1, y: 1, z: 1} m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &3785165941058020905 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7327242023390354019} + 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: 2885087048 + 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 &3261695852906763218 MonoBehaviour: m_ObjectHideFlags: 0 @@ -68,8 +94,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9bbda59cbb9721e419a846e7db104508, type: 3} m_Name: m_EditorClassIdentifier: Assembly-CSharp::ConstructionSite - uiPrefab: {fileID: 5538244123098040924, guid: c3fdbbab939866e4396727cb27c57314, type: 3} - uiOffset: {x: 0, y: 2, z: 1.5} + ShowTopMostFoldoutHeaderGroup: 1 --- !u!54 &1331949327699177778 Rigidbody: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/Ghost.prefab b/Assets/Prefabs/Ghost.prefab index 89ac7e2..8b25c5e 100644 --- a/Assets/Prefabs/Ghost.prefab +++ b/Assets/Prefabs/Ghost.prefab @@ -12,6 +12,7 @@ GameObject: - component: {fileID: 4649899659862504811} - component: {fileID: 4610490688749176459} - component: {fileID: 7009177059939730184} + - component: {fileID: -5453115244065038731} - component: {fileID: 3261695852906763218} m_Layer: 8 m_Name: Ghost @@ -113,6 +114,31 @@ BoxCollider: serializedVersion: 3 m_Size: {x: 1, y: 1, z: 1} m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &-5453115244065038731 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7327242023390354019} + 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: 3155085130 + 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 &3261695852906763218 MonoBehaviour: m_ObjectHideFlags: 0 @@ -125,5 +151,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9bbda59cbb9721e419a846e7db104508, type: 3} m_Name: m_EditorClassIdentifier: Assembly-CSharp::ConstructionSite - uiPrefab: {fileID: 5538244123098040924, guid: c3fdbbab939866e4396727cb27c57314, type: 3} - uiOffset: {x: 0, y: 2, z: 1.5} + ShowTopMostFoldoutHeaderGroup: 1 diff --git a/Assets/Prefabs/Magic Tower Ghost.prefab b/Assets/Prefabs/Magic Tower Ghost.prefab index f6f0886..3643848 100644 --- a/Assets/Prefabs/Magic Tower Ghost.prefab +++ b/Assets/Prefabs/Magic Tower Ghost.prefab @@ -134,6 +134,7 @@ GameObject: - component: {fileID: 3298109745345281552} - component: {fileID: 4024235585611407734} - component: {fileID: 2667395327527483354} + - component: {fileID: -7965990179370776954} m_Layer: 0 m_Name: Magic Tower Ghost m_TagString: Untagged @@ -187,6 +188,31 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: Assembly-CSharp::TowerRangeOverlay _rangeSprite: {fileID: 4058648767628211772} +--- !u!114 &-7965990179370776954 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7327242023390354019} + 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: 1485796851 + 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!1001 &3792579443948877224 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/Magic Tower.prefab b/Assets/Prefabs/Magic Tower.prefab index f23e5bf..9cde9af 100644 --- a/Assets/Prefabs/Magic Tower.prefab +++ b/Assets/Prefabs/Magic Tower.prefab @@ -134,6 +134,7 @@ GameObject: - component: {fileID: 3298109745345281552} - component: {fileID: 962871345428866319} - component: {fileID: 7356025757255843074} + - component: {fileID: 7179969668501766806} m_Layer: 0 m_Name: Magic Tower m_TagString: Untagged @@ -187,6 +188,31 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: Assembly-CSharp::TowerRangeOverlay _rangeSprite: {fileID: 4058648767628211772} +--- !u!114 &7179969668501766806 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7327242023390354019} + 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: 3618989239 + 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!1001 &4380795414928945535 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/MineableBlock.prefab b/Assets/Prefabs/MineableBlock.prefab new file mode 100644 index 0000000..127fc5a --- /dev/null +++ b/Assets/Prefabs/MineableBlock.prefab @@ -0,0 +1,157 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &989066657509100432 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5902598773338262147} + - component: {fileID: 7167019900531103381} + - component: {fileID: 384943650775659982} + - component: {fileID: 3086293200253757409} + - component: {fileID: 7528764990365051674} + - component: {fileID: 3421159559893464927} + m_Layer: 12 + m_Name: MineableBlock + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5902598773338262147 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 989066657509100432} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.5, y: 0.5, z: 0.5} + 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!33 &7167019900531103381 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 989066657509100432} + m_Mesh: {fileID: 4300000, guid: 09d8bdb2477b8c04f87c3f5d1d04a55f, type: 3} +--- !u!23 &384943650775659982 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 989066657509100432} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 8aa7a33ec074d5f429b993c5c857614b, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!64 &3086293200253757409 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 989066657509100432} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 5 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 4300000, guid: 10d475a0f15b31443aa032c25648465b, type: 3} +--- !u!114 &7528764990365051674 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 989066657509100432} + 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: 3286197765 + InScenePlacedSourceGlobalObjectIdHash: 3862515551 + DeferredDespawnTick: 0 + Ownership: 1 + AlwaysReplicateAsRoot: 0 + SynchronizeTransform: 1 + ActiveSceneSynchronization: 0 + SceneMigrationSynchronization: 0 + SpawnWithObservers: 1 + DontDestroyWithOwner: 0 + AutoObjectParentSync: 1 + SyncOwnerTransformWhenParented: 1 + AllowOwnerToParent: 0 +--- !u!114 &3421159559893464927 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 989066657509100432} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e8e42f98781f84c42855fa4e989d3c1b, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::MineableBlock + ShowTopMostFoldoutHeaderGroup: 1 + maxHp: 100 + breakEffectPrefab: {fileID: 0} diff --git a/Assets/Prefabs/MineableBlock.prefab.meta b/Assets/Prefabs/MineableBlock.prefab.meta new file mode 100644 index 0000000..a854402 --- /dev/null +++ b/Assets/Prefabs/MineableBlock.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: dbb1cfcb3d9e3844e8d9cdf09b0a1660 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Player.prefab b/Assets/Prefabs/Player.prefab index a7a3c75..6d8ef1a 100644 --- a/Assets/Prefabs/Player.prefab +++ b/Assets/Prefabs/Player.prefab @@ -62,14 +62,14 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] - m_AddedGameObjects: [] + m_AddedGameObjects: + - targetCorrespondingSourceObject: {fileID: 7214371169738337839, guid: ffaf1ddb2ff58d2448ccfdd357387f63, type: 3} + insertIndex: -1 + addedObject: {fileID: 3720075572878964961} + - targetCorrespondingSourceObject: {fileID: -5515783359193845756, guid: ffaf1ddb2ff58d2448ccfdd357387f63, type: 3} + insertIndex: -1 + addedObject: {fileID: 7664176696647622611} m_AddedComponents: - - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: ffaf1ddb2ff58d2448ccfdd357387f63, type: 3} - insertIndex: -1 - addedObject: {fileID: 2502853225347469563} - - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: ffaf1ddb2ff58d2448ccfdd357387f63, type: 3} - insertIndex: -1 - addedObject: {fileID: 5427120340594505786} - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: ffaf1ddb2ff58d2448ccfdd357387f63, type: 3} insertIndex: -1 addedObject: {fileID: 7743182389554125766} @@ -79,52 +79,29 @@ PrefabInstance: - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: ffaf1ddb2ff58d2448ccfdd357387f63, type: 3} insertIndex: -1 addedObject: {fileID: 5870045807328036684} + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: ffaf1ddb2ff58d2448ccfdd357387f63, type: 3} + insertIndex: -1 + addedObject: {fileID: 6769721986461071292} + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: ffaf1ddb2ff58d2448ccfdd357387f63, type: 3} + insertIndex: -1 + addedObject: {fileID: 630605692584084810} + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: ffaf1ddb2ff58d2448ccfdd357387f63, type: 3} + insertIndex: -1 + addedObject: {fileID: 106528027568436521} + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: ffaf1ddb2ff58d2448ccfdd357387f63, type: 3} + insertIndex: -1 + addedObject: {fileID: 4197956822729057335} m_SourcePrefab: {fileID: 100100000, guid: ffaf1ddb2ff58d2448ccfdd357387f63, type: 3} +--- !u!4 &2152733048352974824 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -5515783359193845756, guid: ffaf1ddb2ff58d2448ccfdd357387f63, type: 3} + m_PrefabInstance: {fileID: 3356319783404427244} + m_PrefabAsset: {fileID: 0} --- !u!1 &2473992278589500093 stripped GameObject: m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: ffaf1ddb2ff58d2448ccfdd357387f63, type: 3} m_PrefabInstance: {fileID: 3356319783404427244} m_PrefabAsset: {fileID: 0} ---- !u!114 &2502853225347469563 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2473992278589500093} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 736c03e837e6b074ba7f90b813050aed, type: 3} - m_Name: - m_EditorClassIdentifier: Assembly-CSharp::PlayerInteractionController - range: 3 - interactableLayer: - serializedVersion: 2 - m_Bits: 0 - constructionLayer: - serializedVersion: 2 - m_Bits: 0 - buildSpeedMultiplier: 2 ---- !u!114 &5427120340594505786 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2473992278589500093} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 768ea4bbb68b30140921c7192ebe2852, type: 3} - m_Name: - m_EditorClassIdentifier: Assembly-CSharp::PlayerMovement - moveSpeed: 5 - rotationSpeed: 10 - jumpHeight: 1.5 - gravity: -19.62 - interactRange: 3 - interactableLayer: - serializedVersion: 2 - m_Bits: 1024 --- !u!143 &7743182389554125766 CharacterController: m_ObjectHideFlags: 0 @@ -185,3 +162,269 @@ Animator: m_AllowConstantClipSamplingOptimization: 1 m_KeepAnimatorStateOnDisable: 0 m_WriteDefaultValuesOnDisable: 0 +--- !u!114 &6769721986461071292 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2473992278589500093} + 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: 856270328 + 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 &630605692584084810 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2473992278589500093} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a5866e584e3482645a906bd152cd00fe, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::PlayerNetworkController + ShowTopMostFoldoutHeaderGroup: 1 + moveSpeed: 5 + rotationSpeed: 10 + jumpHeight: 1.5 + gravity: -19.62 + interactRange: 3 + interactableLayer: + serializedVersion: 2 + m_Bits: 1024 + constructionLayer: + serializedVersion: 2 + m_Bits: 256 + buildSpeedMultiplier: 2 + attackRange: 5 + miningDamage: 25 + mineableLayer: + serializedVersion: 2 + m_Bits: 4096 +--- !u!114 &106528027568436521 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2473992278589500093} + 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: 1 + SyncScaleY: 1 + SyncScaleZ: 1 + PositionThreshold: 0.001 + RotAngleThreshold: 0.01 + ScaleThreshold: 0.01 + UseQuaternionSynchronization: 0 + UseQuaternionCompression: 0 + UseHalfFloatPrecision: 0 + InLocalSpace: 1 + SwitchTransformSpaceWhenParented: 0 + Interpolate: 1 + SlerpPosition: 0 +--- !u!114 &4197956822729057335 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2473992278589500093} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7154bdbb6b349e7468f33b4e16cd11b1, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::OwnerNetworkAnimator + ShowTopMostFoldoutHeaderGroup: 1 + NetworkAnimatorExpanded: 0 + AuthorityMode: 0 + m_Animator: {fileID: 5870045807328036684} + TransitionStateInfoList: [] + AnimatorParameterEntries: + ParameterEntries: + - name: MoveSpeed + NameHash: 526065662 + Synchronize: 1 + ParameterType: 1 + - name: Attack + NameHash: 1080829965 + Synchronize: 1 + ParameterType: 9 + - name: isGrounded + NameHash: 1360771445 + Synchronize: 1 + ParameterType: 4 + - name: Interact + NameHash: -662453572 + Synchronize: 1 + ParameterType: 9 + AnimatorParametersExpanded: 0 +--- !u!4 &5371267496600762819 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 7214371169738337839, guid: ffaf1ddb2ff58d2448ccfdd357387f63, type: 3} + m_PrefabInstance: {fileID: 3356319783404427244} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &3759068057766698762 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 5371267496600762819} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} + propertyPath: m_LocalRotation.x + value: 0.000000021855694 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: b27a875d1f1770c47ad339508a336e15, type: 3} + propertyPath: m_Name + value: Bat + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: b27a875d1f1770c47ad339508a336e15, type: 3} +--- !u!4 &3720075572878964961 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} + m_PrefabInstance: {fileID: 3759068057766698762} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &7914541313062565944 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 2152733048352974824} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: b27a875d1f1770c47ad339508a336e15, type: 3} + propertyPath: m_Name + value: Bat + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: b27a875d1f1770c47ad339508a336e15, type: 3} +--- !u!4 &7664176696647622611 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} + m_PrefabInstance: {fileID: 7914541313062565944} + m_PrefabAsset: {fileID: 0} diff --git a/Assets/Prefabs/Tunnel Ghost.prefab b/Assets/Prefabs/Tunnel Ghost.prefab index b1c1c92..487545d 100644 --- a/Assets/Prefabs/Tunnel Ghost.prefab +++ b/Assets/Prefabs/Tunnel Ghost.prefab @@ -122,6 +122,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 7892781535212668078} + - component: {fileID: -1186229343452769656} m_Layer: 0 m_Name: Tunnel Ghost m_TagString: Untagged @@ -145,3 +146,28 @@ Transform: - {fileID: 2868461863944357123} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &-1186229343452769656 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7817822323996939414} + 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: 665108686 + InScenePlacedSourceGlobalObjectIdHash: 0 + DeferredDespawnTick: 0 + Ownership: 1 + AlwaysReplicateAsRoot: 0 + SynchronizeTransform: 1 + ActiveSceneSynchronization: 0 + SceneMigrationSynchronization: 1 + SpawnWithObservers: 1 + DontDestroyWithOwner: 0 + AutoObjectParentSync: 1 + SyncOwnerTransformWhenParented: 1 + AllowOwnerToParent: 0 diff --git a/Assets/Prefabs/Tunnel.prefab b/Assets/Prefabs/Tunnel.prefab index ab33ae2..d6d9cb1 100644 --- a/Assets/Prefabs/Tunnel.prefab +++ b/Assets/Prefabs/Tunnel.prefab @@ -45,6 +45,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 275306f282948c343bf20ee884ad22b8, type: 3} m_Name: m_EditorClassIdentifier: Assembly-CSharp::TunnelNode + ShowTopMostFoldoutHeaderGroup: 1 aboveNode: {fileID: 0} belowNode: {fileID: 0} --- !u!65 &2292926820231089492 @@ -223,6 +224,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 7892781535212668078} + - component: {fileID: 5637751854208875435} m_Layer: 11 m_Name: Tunnel m_TagString: Untagged @@ -246,3 +248,28 @@ Transform: - {fileID: 5411003075815891614} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &5637751854208875435 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7817822323996939414} + 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: 3924490917 + InScenePlacedSourceGlobalObjectIdHash: 0 + DeferredDespawnTick: 0 + Ownership: 1 + AlwaysReplicateAsRoot: 0 + SynchronizeTransform: 1 + ActiveSceneSynchronization: 0 + SceneMigrationSynchronization: 1 + SpawnWithObservers: 1 + DontDestroyWithOwner: 0 + AutoObjectParentSync: 1 + SyncOwnerTransformWhenParented: 1 + AllowOwnerToParent: 0 diff --git a/Assets/Scenes/DefenceScene.unity b/Assets/Scenes/DefenceScene.unity index 1e95862..08033fe 100644 --- a/Assets/Scenes/DefenceScene.unity +++ b/Assets/Scenes/DefenceScene.unity @@ -824,11 +824,6 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 342345820} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &349478722 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 5371267496600762819, guid: fe3685eff459f8b4d8b8d0786aad07de, type: 3} - m_PrefabInstance: {fileID: 8656281371358744854} - m_PrefabAsset: {fileID: 0} --- !u!4 &372588680 stripped Transform: m_CorrespondingSourceObject: {fileID: 6438027004378685690, guid: 2bb7e098e271eb44a873c856dbf59c7c, type: 3} @@ -844,6 +839,7 @@ GameObject: m_Component: - component: {fileID: 412220987} - component: {fileID: 412220988} + - component: {fileID: 412220989} m_Layer: 0 m_Name: BuildManager m_TagString: Untagged @@ -878,47 +874,52 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 2d6331caa25f3aa4aa4fbd51ef4ec71a, type: 3} m_Name: m_EditorClassIdentifier: Assembly-CSharp::BuildManager + ShowTopMostFoldoutHeaderGroup: 1 cellSize: 1 tunnelHeight: 3 - groundLayer: - serializedVersion: 2 - m_Bits: 128 constructionSitePrefab: {fileID: 7327242023390354019, guid: 7d362c5c1b34c2b4e901294618e6c3e8, type: 3} - playerLayer: - serializedVersion: 2 - m_Bits: 512 turretLibrary: - turretName: Arrow Tower - isTunnel: 0 finalPrefab: {fileID: 7327242023390354019, guid: 9f0adbb07b3928847861b8bf306ca412, type: 3} ghostPrefab: {fileID: 7327242023390354019, guid: 773f85c1a4ec87a4da4cbbb9d2e730cd, type: 3} buildTime: 3 - size: {x: 1, y: 1} - turretName: Cannon Tower - isTunnel: 0 finalPrefab: {fileID: 7327242023390354019, guid: 77ee51d7bba39bb4ea1c89b16e1052ba, type: 3} ghostPrefab: {fileID: 7327242023390354019, guid: 898d65cff675d304a9eb583546d3312b, type: 3} buildTime: 5 - size: {x: 2, y: 2} - turretName: Magic Tower - isTunnel: 0 finalPrefab: {fileID: 7327242023390354019, guid: 1a0743e23b3b9094bb86849376c9f73c, type: 3} ghostPrefab: {fileID: 7327242023390354019, guid: fc47abc0080971d4fa7cf22f661f1b98, type: 3} buildTime: 10 - size: {x: 1, y: 1} - turretName: Tunnel - isTunnel: 1 finalPrefab: {fileID: 7817822323996939414, guid: 48bf40d31e903d34f9469451d7de06dd, type: 3} ghostPrefab: {fileID: 7817822323996939414, guid: 532bea89bbc1d2245b65a9c22749711a, type: 3} buildTime: 10 - size: {x: 1, y: 1} - selectedTurret: - turretName: asd - isTunnel: 0 - finalPrefab: {fileID: 7327242023390354019, guid: f74a3b8b4fd9ffe44aab9f60247dc8b0, type: 3} - ghostPrefab: {fileID: 7327242023390354019, guid: 2c280b2ae26e7364b8afee740b7cc712, type: 3} - buildTime: 3 - size: {x: 1, y: 1} +--- !u!114 &412220989 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 412220986} + 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: 3795975761 + InScenePlacedSourceGlobalObjectIdHash: 0 + DeferredDespawnTick: 0 + Ownership: 1 + AlwaysReplicateAsRoot: 0 + SynchronizeTransform: 1 + ActiveSceneSynchronization: 0 + SceneMigrationSynchronization: 0 + SpawnWithObservers: 1 + DontDestroyWithOwner: 0 + AutoObjectParentSync: 1 + SyncOwnerTransformWhenParented: 1 + AllowOwnerToParent: 0 --- !u!1 &445606021 stripped GameObject: m_CorrespondingSourceObject: {fileID: 6403733529880835406, guid: 443aa97110814434cb36b26656f1884c, type: 3} @@ -1011,6 +1012,112 @@ Transform: m_CorrespondingSourceObject: {fileID: 7892781535212668078, guid: 48bf40d31e903d34f9469451d7de06dd, type: 3} m_PrefabInstance: {fileID: 1320111437} m_PrefabAsset: {fileID: 0} +--- !u!1 &556982642 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 556982644} + - component: {fileID: 556982643} + - component: {fileID: 556982645} + m_Layer: 0 + m_Name: Network Manager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &556982643 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 556982642} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 593a2fe42fa9d37498c96f9a383b6521, type: 3} + m_Name: + m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkManager + NetworkManagerExpanded: 0 + NetworkConfig: + ProtocolVersion: 0 + NetworkTransport: {fileID: 556982645} + PlayerPrefab: {fileID: 2473992278589500093, guid: fe3685eff459f8b4d8b8d0786aad07de, type: 3} + Prefabs: + NetworkPrefabsLists: + - {fileID: 11400000, guid: 4ae00697a21204b49b3f63483dfc711f, type: 2} + TickRate: 30 + ClientConnectionBufferTimeout: 10 + ConnectionApproval: 0 + ConnectionData: + EnableTimeResync: 0 + TimeResyncInterval: 30 + EnsureNetworkVariableLengthSafety: 0 + EnableSceneManagement: 1 + ForceSamePrefabs: 1 + RecycleNetworkIds: 1 + NetworkIdRecycleDelay: 120 + RpcHashSize: 0 + LoadSceneTimeOut: 120 + SpawnTimeout: 10 + EnableNetworkLogs: 1 + NetworkTopology: 0 + UseCMBService: 0 + AutoSpawnPlayerPrefabClientSide: 1 + NetworkMessageMetrics: 1 + NetworkProfilingMetrics: 1 + OldPrefabList: [] + RunInBackground: 1 + LogLevel: 1 +--- !u!4 &556982644 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 556982642} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 10} + 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 &556982645 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 556982642} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6960e84d07fb87f47956e7a81d71c4e6, type: 3} + m_Name: + m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.Transports.UTP.UnityTransport + m_ProtocolType: 0 + m_UseWebSockets: 0 + m_UseEncryption: 0 + m_MaxPacketQueueSize: 128 + m_MaxPayloadSize: 6144 + m_HeartbeatTimeoutMS: 500 + m_ConnectTimeoutMS: 1000 + m_MaxConnectAttempts: 60 + m_DisconnectTimeoutMS: 30000 + ConnectionData: + Address: 127.0.0.1 + Port: 7777 + ServerListenAddress: 127.0.0.1 + ClientBindPort: 0 + DebugSimulator: + PacketDelayMS: 0 + PacketJitterMS: 0 + PacketDropRate: 0 --- !u!1 &584961938 GameObject: m_ObjectHideFlags: 0 @@ -1465,11 +1572,6 @@ Transform: - {fileID: 545458833} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &758471573 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 2152733048352974824, guid: fe3685eff459f8b4d8b8d0786aad07de, type: 3} - m_PrefabInstance: {fileID: 8656281371358744854} - m_PrefabAsset: {fileID: 0} --- !u!1 &789135791 GameObject: m_ObjectHideFlags: 0 @@ -1658,16 +1760,6 @@ PrefabInstance: insertIndex: -1 addedObject: {fileID: 445606027} m_SourcePrefab: {fileID: 100100000, guid: 443aa97110814434cb36b26656f1884c, type: 3} ---- !u!4 &991856763 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 2963001807633297415, guid: fe3685eff459f8b4d8b8d0786aad07de, type: 3} - m_PrefabInstance: {fileID: 8656281371358744854} - m_PrefabAsset: {fileID: 0} ---- !u!4 &1033937481 stripped -Transform: - m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} - m_PrefabInstance: {fileID: 1388440998} - m_PrefabAsset: {fileID: 0} --- !u!1 &1044242050 GameObject: m_ObjectHideFlags: 0 @@ -2057,6 +2149,18 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 743367988} m_Modifications: + - target: {fileID: 5637751854208875435, guid: 48bf40d31e903d34f9469451d7de06dd, type: 3} + propertyPath: GlobalObjectIdHash + value: 3269291363 + objectReference: {fileID: 0} + - target: {fileID: 5637751854208875435, guid: 48bf40d31e903d34f9469451d7de06dd, type: 3} + propertyPath: SceneMigrationSynchronization + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5637751854208875435, guid: 48bf40d31e903d34f9469451d7de06dd, type: 3} + propertyPath: InScenePlacedSourceGlobalObjectIdHash + value: 3924490917 + objectReference: {fileID: 0} - target: {fileID: 7817822323996939414, guid: 48bf40d31e903d34f9469451d7de06dd, type: 3} propertyPath: m_Name value: Tunnel (1) @@ -2218,63 +2322,6 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1365372344} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1001 &1388440998 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 758471573} - m_Modifications: - - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 919132149155446097, guid: b27a875d1f1770c47ad339508a336e15, type: 3} - propertyPath: m_Name - value: Bat - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: b27a875d1f1770c47ad339508a336e15, type: 3} --- !u!1 &1409253543 GameObject: m_ObjectHideFlags: 0 @@ -2515,11 +2562,6 @@ Transform: m_CorrespondingSourceObject: {fileID: 2338240775821095493, guid: 1955bdf7dd2940f44aa117fbcf6eb626, type: 3} m_PrefabInstance: {fileID: 1242393178} m_PrefabAsset: {fileID: 0} ---- !u!4 &1600144288 stripped -Transform: - m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} - m_PrefabInstance: {fileID: 2116800985} - m_PrefabAsset: {fileID: 0} --- !u!1 &1600458457 GameObject: m_ObjectHideFlags: 0 @@ -3181,63 +3223,6 @@ Transform: m_CorrespondingSourceObject: {fileID: 2338240775821095493, guid: 1955bdf7dd2940f44aa117fbcf6eb626, type: 3} m_PrefabInstance: {fileID: 497942047} m_PrefabAsset: {fileID: 0} ---- !u!1001 &2116800985 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 349478722} - m_Modifications: - - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} - propertyPath: m_LocalRotation.x - value: 0.000000021855694 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: b27a875d1f1770c47ad339508a336e15, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 919132149155446097, guid: b27a875d1f1770c47ad339508a336e15, type: 3} - propertyPath: m_Name - value: Bat - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: b27a875d1f1770c47ad339508a336e15, type: 3} --- !u!1001 &3690888448170635710 PrefabInstance: m_ObjectHideFlags: 0 @@ -3317,7 +3302,7 @@ PrefabInstance: - target: {fileID: 3590434222513987346, guid: 2b08dd32e48ef5e4aa65a6122099152e, type: 3} propertyPath: Target.TrackingTarget value: - objectReference: {fileID: 991856763} + objectReference: {fileID: 0} - target: {fileID: 4415413950589506134, guid: 2b08dd32e48ef5e4aa65a6122099152e, type: 3} propertyPath: m_LocalPosition.x value: 3.53023 @@ -3351,69 +3336,6 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 2b08dd32e48ef5e4aa65a6122099152e, type: 3} ---- !u!1001 &8656281371358744854 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 2473992278589500093, guid: fe3685eff459f8b4d8b8d0786aad07de, type: 3} - propertyPath: m_Name - value: Player - objectReference: {fileID: 0} - - target: {fileID: 2963001807633297415, guid: fe3685eff459f8b4d8b8d0786aad07de, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2963001807633297415, guid: fe3685eff459f8b4d8b8d0786aad07de, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2963001807633297415, guid: fe3685eff459f8b4d8b8d0786aad07de, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2963001807633297415, guid: fe3685eff459f8b4d8b8d0786aad07de, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 2963001807633297415, guid: fe3685eff459f8b4d8b8d0786aad07de, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2963001807633297415, guid: fe3685eff459f8b4d8b8d0786aad07de, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2963001807633297415, guid: fe3685eff459f8b4d8b8d0786aad07de, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2963001807633297415, guid: fe3685eff459f8b4d8b8d0786aad07de, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2963001807633297415, guid: fe3685eff459f8b4d8b8d0786aad07de, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2963001807633297415, guid: fe3685eff459f8b4d8b8d0786aad07de, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: - - targetCorrespondingSourceObject: {fileID: 5371267496600762819, guid: fe3685eff459f8b4d8b8d0786aad07de, type: 3} - insertIndex: -1 - addedObject: {fileID: 1600144288} - - targetCorrespondingSourceObject: {fileID: 2152733048352974824, guid: fe3685eff459f8b4d8b8d0786aad07de, type: 3} - insertIndex: -1 - addedObject: {fileID: 1033937481} - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: fe3685eff459f8b4d8b8d0786aad07de, type: 3} --- !u!1660057539 &9223372036854775807 SceneRoots: m_ObjectHideFlags: 0 @@ -3423,4 +3345,4 @@ SceneRoots: - {fileID: 670724422} - {fileID: 1409253547} - {fileID: 14847856} - - {fileID: 8656281371358744854} + - {fileID: 556982644} diff --git a/Assets/Scripts/GameBase/BuildManager.cs b/Assets/Scripts/GameBase/BuildManager.cs index 60847a7..6e95cec 100644 --- a/Assets/Scripts/GameBase/BuildManager.cs +++ b/Assets/Scripts/GameBase/BuildManager.cs @@ -1,9 +1,10 @@ using UnityEngine; +using Unity.Netcode; using UnityEngine.InputSystem; using UnityEngine.EventSystems; using System.Collections.Generic; -public class BuildManager : MonoBehaviour +public class BuildManager : NetworkBehaviour { public static BuildManager Instance; @@ -11,113 +12,81 @@ public class BuildManager : MonoBehaviour public struct TurretData { public string turretName; - public bool isTunnel; - public GameObject finalPrefab; - public GameObject ghostPrefab; + public GameObject finalPrefab; // NetworkObject 필수 + public GameObject ghostPrefab; // 로컬 프리뷰용 public float buildTime; - public Vector2Int size; } - [Header("Settings")] + [Header("Grid Settings")] public float cellSize = 1f; public float tunnelHeight = 3f; - [SerializeField] private LayerMask groundLayer; + [SerializeField] private float yOffset = 0.5f; // 터널 중심점 오프셋 + + [Header("Prefabs & Layers")] [SerializeField] private GameObject constructionSitePrefab; + [SerializeField] private List turretLibrary = new List(); + [SerializeField] private LayerMask groundLayer; [SerializeField] private LayerMask playerLayer; - [Header("Turret Library")] - [SerializeField] private List turretLibrary; - [SerializeField] private TurretData selectedTurret; - - private GameObject _ghostInstance; - private Material _ghostMaterial; + private int _selectedTurretIndex = 0; private bool _isBuildMode = false; - public bool IsBuildMode => _isBuildMode; + private GameObject _ghostInstance; + private Vector3Int _currentGridPos; + private PlayerInputActions _inputActions; - // 좌표 레지스트리 (물리 탐색 대체) + // 데이터 레지스트리 (다른 코드에서 참조) private Dictionary _tunnelRegistry = new Dictionary(); private HashSet _occupiedNodes = new HashSet(); - private PlayerInputActions _inputActions; - private Vector3Int _currentGridPos; - private float _currentY; - - - // 게임 시작 시 기존 터널들 등록 (반드시 필요!) - void Start() - { - // 1. 씬에 배치된 모든 터널을 찾아 등록하고 연결합니다. - RegisterAllExistingTunnels(); - } - - public void RegisterTunnel(Vector3Int pos, TunnelNode node) - { - if (!_tunnelRegistry.ContainsKey(pos)) - { - _tunnelRegistry.Add(pos, node); - _occupiedNodes.Add(pos); - Debug.Log($"[Registry] {pos} 좌표에 {node.name} 등록 완료"); - } - } - - // 씬에 이미 배치된 터널들을 등록하는 함수 (Start에서 호출) - public void RegisterAllExistingTunnels() - { - _tunnelRegistry.Clear(); - _occupiedNodes.Clear(); - - TunnelNode[] nodes = FindObjectsByType(FindObjectsSortMode.None); - HashSet roots = new HashSet(); - - foreach (var node in nodes) - { - Transform root = node.transform.parent.parent; // Tunnel (1) - if (!roots.Contains(root)) - { - Vector3Int pos = WorldToGrid3D(root.position); - RegisterTunnel(pos, node); - roots.Add(root); - } - } - - // 모든 등록이 끝난 후 '동시에' 연결 - foreach (var node in nodes) node.LinkVertical(); - } - - // [핵심 수정] 노드의 위치가 아닌, 터널 부모의 위치를 넣어도 정확한 격자가 나오도록 함 - public Vector3Int WorldToGrid3D(Vector3 worldPos) - { - int x = Mathf.FloorToInt(worldPos.x / cellSize); - int z = Mathf.FloorToInt(worldPos.z / cellSize); - // Y값은 tunnelHeight로 나눈 뒤 반올림(Round)하여 오차 극복 - int y = Mathf.RoundToInt(worldPos.y / tunnelHeight); - return new Vector3Int(x, y, z); - } - void Awake() { - Instance = this; + if (Instance == null) Instance = this; + else Destroy(gameObject); + _inputActions = new PlayerInputActions(); } - void OnEnable() + public override void OnNetworkSpawn() { - // 최신 Input System 콜백 등록 + // 최신 Action-based 이벤트 바인딩 + _inputActions.Player.ToggleBuild.performed += ctx => ToggleBuildMode(); _inputActions.Player.Build.performed += ctx => OnBuildRequested(); _inputActions.Player.Cancel.performed += ctx => ExitBuildMode(); - _inputActions.Player.ToggleBuild.performed += ctx => ToggleBuildMode(); - _inputActions.Enable(); - } - void OnDisable() => _inputActions.Disable(); + // 숫자키 슬롯 선택 (Input Action 에셋 설정에 따라 Select1, Select2... 등 사용) + _inputActions.Player.Select1.performed += ctx => SelectTurret(0); + _inputActions.Player.Select2.performed += ctx => SelectTurret(1); + _inputActions.Player.Select3.performed += ctx => SelectTurret(2); + + _inputActions.Enable(); + + // 시작 시 씬에 배치된 터널 자동 등록 + RegisterAllExistingTunnels(); + } void Update() { if (!_isBuildMode || _ghostInstance == null) return; - UpdateGhostPosition(); } + #region Selection & Build Logic + + public void SelectTurret(int index) + { + if (index < 0 || index >= turretLibrary.Count) return; + + _selectedTurretIndex = index; + Debug.Log($"타워 선택: {turretLibrary[_selectedTurretIndex].turretName}"); + + if (_isBuildMode) + { + if (_ghostInstance != null) Destroy(_ghostInstance); + _ghostInstance = Instantiate(turretLibrary[_selectedTurretIndex].ghostPrefab); + _ghostInstance.transform.position = GridToWorld(_currentGridPos); + } + } + private void UpdateGhostPosition() { Ray ray = Camera.main.ScreenPointToRay(Mouse.current.position.ReadValue()); @@ -125,61 +94,112 @@ public class BuildManager : MonoBehaviour if (Physics.Raycast(ray, out RaycastHit hit, Mathf.Infinity, groundLayer | tunnelMask)) { - Vector2Int xz = WorldToGrid(hit.point); - float targetY = 0.05f; - int floor = 0; + Vector3Int gridPos = WorldToGrid3D(hit.point); - // 터널 조준 시 지하로 스냅 + // 터널 조준 시 해당 터널의 한 칸 아래로 스냅 if (((1 << hit.collider.gameObject.layer) & tunnelMask) != 0) { - xz = WorldToGrid(hit.collider.transform.position); - targetY = hit.collider.transform.position.y - tunnelHeight; - floor = Mathf.RoundToInt(targetY / tunnelHeight); + gridPos = WorldToGrid3D(hit.collider.transform.position) + Vector3Int.down; } - _currentGridPos = new Vector3Int(xz.x, floor, xz.y); - _currentY = targetY; - - _ghostInstance.transform.position = new Vector3(xz.x * cellSize, targetY, xz.y * cellSize); - - bool canBuild = CanBuildVertical(_currentGridPos); - _ghostMaterial.color = canBuild ? new Color(0, 1, 0, 0.5f) : new Color(1, 0, 0, 0.5f); + _currentGridPos = gridPos; + _ghostInstance.transform.position = GridToWorld(gridPos); } } - private bool CanBuildVertical(Vector3Int pos) - { - if (_occupiedNodes.Contains(pos)) return false; - // 지하 건설 시 위층 터널 존재 여부 확인 - if (pos.y < 0 && !_occupiedNodes.Contains(pos + Vector3Int.up)) return false; - - // 플레이어와 겹치는지 확인 - return !Physics.CheckBox(new Vector3(pos.x * cellSize, pos.y * tunnelHeight + 1f, pos.z * cellSize), - new Vector3(0.45f, 0.5f, 0.45f), Quaternion.identity, playerLayer); - } - private void OnBuildRequested() { if (!_isBuildMode || EventSystem.current.IsPointerOverGameObject()) return; - if (!CanBuildVertical(_currentGridPos)) return; - _occupiedNodes.Add(_currentGridPos); - GameObject site = Instantiate(constructionSitePrefab, _ghostInstance.transform.position, Quaternion.identity); - site.GetComponent().Initialize(selectedTurret.finalPrefab, selectedTurret.buildTime, _currentGridPos); + // 서버에 건설 가능 여부 확인 및 생성 요청 + RequestBuildRpc(_selectedTurretIndex, _currentGridPos); ExitBuildMode(); } + [Rpc(SendTo.Server, InvokePermission = RpcInvokePermission.Everyone)] + private void RequestBuildRpc(int index, Vector3Int gridPos) + { + // 서버 측 중복 점유 확인 + if (_occupiedNodes.Contains(gridPos)) return; + + Vector3 spawnPos = GridToWorld(gridPos); + + // 1. 토대 생성 및 네트워크 스폰 + GameObject siteObj = Instantiate(constructionSitePrefab, spawnPos, Quaternion.identity); + siteObj.GetComponent().Spawn(); + + // 2. 토대 데이터 초기화 + ConstructionSite site = siteObj.GetComponent(); + if (site != null) + { + site.Initialize(index, gridPos); + } + + _occupiedNodes.Add(gridPos); + } + + #endregion + + #region Utility Functions (External References) + + // ConstructionSite에서 프리팹 정보를 가져갈 때 사용 + public TurretData GetTurretData(int index) => turretLibrary[index]; + + // TunnelNode가 스폰될 때 자신을 등록하기 위해 사용 + public void RegisterTunnel(Vector3Int pos, TunnelNode node) + { + if (!_tunnelRegistry.ContainsKey(pos)) + { + _tunnelRegistry.Add(pos, node); + _occupiedNodes.Add(pos); // 건설된 구역으로 마킹 + } + } + + // TunnelNode가 위아래 노드를 찾기 위해 사용 public TunnelNode GetTunnelAt(Vector3Int pos) => _tunnelRegistry.GetValueOrDefault(pos); - public Vector2Int WorldToGrid(Vector3 pos) => new Vector2Int(Mathf.FloorToInt(pos.x / cellSize), Mathf.FloorToInt(pos.z / cellSize)); + // 좌표 변환: 월드 -> 격자 인덱스 (0.5 오프셋 반영) + public Vector3Int WorldToGrid3D(Vector3 worldPos) + { + return new Vector3Int( + Mathf.FloorToInt(worldPos.x / cellSize), + Mathf.RoundToInt((worldPos.y - yOffset) / tunnelHeight), + Mathf.FloorToInt(worldPos.z / cellSize) + ); + } - private void ToggleBuildMode() { if (_isBuildMode) ExitBuildMode(); else EnterBuildMode(); } + // 좌표 변환: 격자 인덱스 -> 월드 (0.5 오프셋 반영) + public Vector3 GridToWorld(Vector3Int gridPos) + { + return new Vector3( + gridPos.x * cellSize, + (gridPos.y * tunnelHeight) + yOffset, + gridPos.z * cellSize + ); + } + + // 씬에 미리 배치된 터널들을 한꺼번에 등록 + public void RegisterAllExistingTunnels() + { + TunnelNode[] nodes = FindObjectsByType(FindObjectsSortMode.None); + foreach (var node in nodes) + { + Vector3Int pos = WorldToGrid3D(node.transform.position); + RegisterTunnel(pos, node); + } + } + + #endregion + + #region Mode Switching + + public void ToggleBuildMode() { if (_isBuildMode) ExitBuildMode(); else EnterBuildMode(); } private void EnterBuildMode() { + if (turretLibrary.Count == 0) return; _isBuildMode = true; - _ghostInstance = Instantiate(selectedTurret.ghostPrefab); - _ghostMaterial = _ghostInstance.GetComponentInChildren().material; + _ghostInstance = Instantiate(turretLibrary[_selectedTurretIndex].ghostPrefab); } private void ExitBuildMode() { @@ -187,27 +207,7 @@ public class BuildManager : MonoBehaviour if (_ghostInstance) Destroy(_ghostInstance); } - // BuildManager.cs 내부 - public void SelectTurret(int index) - { - if (index >= 0 && index < turretLibrary.Count) - { - selectedTurret = turretLibrary[index]; + #endregion - // 현재 건설 모드가 아니라면 건설 모드로 진입 - if (!_isBuildMode) - { - EnterBuildMode(); - } - else - { - // 이미 건설 모드라면 고스트만 교체 - if (_ghostInstance) Destroy(_ghostInstance); - _ghostInstance = Instantiate(selectedTurret.ghostPrefab); - _ghostMaterial = _ghostInstance.GetComponentInChildren().material; - } - - Debug.Log($"{selectedTurret.turretName} 선택됨"); - } - } + public override void OnNetworkDespawn() => _inputActions.Disable(); } \ No newline at end of file diff --git a/Assets/Scripts/MineableBlock.cs b/Assets/Scripts/MineableBlock.cs new file mode 100644 index 0000000..e6d937b --- /dev/null +++ b/Assets/Scripts/MineableBlock.cs @@ -0,0 +1,54 @@ +using UnityEngine; +using Unity.Netcode; + +public class MineableBlock : NetworkBehaviour +{ + [Header("Block Stats")] + [SerializeField] private int maxHp = 100; + // [동기화] 모든 플레이어가 동일한 블록 체력을 보게 함 + private NetworkVariable _currentHp = new NetworkVariable(); + + [Header("Visuals")] + [SerializeField] private GameObject breakEffectPrefab; // 파괴 시 파티클 + + public override void OnNetworkSpawn() + { + if (IsServer) + { + _currentHp.Value = maxHp; + } + } + + // 서버에서만 대미지를 처리하도록 제한 + [Rpc(SendTo.Server, InvokePermission = RpcInvokePermission.Everyone)] + public void TakeDamageRpc(int damageAmount) + { + if (_currentHp.Value <= 0) return; + + _currentHp.Value -= damageAmount; + Debug.Log($"블록 대미지! 남은 체력: {_currentHp.Value}"); + + if (_currentHp.Value <= 0) + { + DestroyBlock(); + } + } + + private void DestroyBlock() + { + // 1. 모든 클라이언트에게 파괴 이펙트 재생 요청 + PlayBreakEffectRpc(); + + // 2. 서버에서 네트워크 오브젝트 제거 (모든 클라이언트에서 사라짐) + GetComponent().Despawn(); + } + + [Rpc(SendTo.Everyone)] + private void PlayBreakEffectRpc() + { + if (breakEffectPrefab != null) + { + Instantiate(breakEffectPrefab, transform.position, Quaternion.identity); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/MineableBlock.cs.meta b/Assets/Scripts/MineableBlock.cs.meta new file mode 100644 index 0000000..4ecf904 --- /dev/null +++ b/Assets/Scripts/MineableBlock.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: e8e42f98781f84c42855fa4e989d3c1b \ No newline at end of file diff --git a/Assets/Scripts/OwnerNetworkAnimator.cs b/Assets/Scripts/OwnerNetworkAnimator.cs new file mode 100644 index 0000000..2686837 --- /dev/null +++ b/Assets/Scripts/OwnerNetworkAnimator.cs @@ -0,0 +1,13 @@ +using Unity.Netcode.Components; +using UnityEngine; + +// 이 스크립트를 파일로 저장하세요. +[DisallowMultipleComponent] +public class OwnerNetworkAnimator : NetworkAnimator +{ + // 이동 권한이 Owner에게 있으므로, 애니메이션 권한도 Owner가 갖도록 설정합니다. + protected override bool OnIsServerAuthoritative() + { + return false; + } +} \ No newline at end of file diff --git a/Assets/Scripts/OwnerNetworkAnimator.cs.meta b/Assets/Scripts/OwnerNetworkAnimator.cs.meta new file mode 100644 index 0000000..00b1094 --- /dev/null +++ b/Assets/Scripts/OwnerNetworkAnimator.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 7154bdbb6b349e7468f33b4e16cd11b1 \ No newline at end of file diff --git a/Assets/Scripts/Player/PlayerNetworkController.cs b/Assets/Scripts/Player/PlayerNetworkController.cs new file mode 100644 index 0000000..fc0bb7d --- /dev/null +++ b/Assets/Scripts/Player/PlayerNetworkController.cs @@ -0,0 +1,173 @@ +using UnityEngine; +using UnityEngine.InputSystem; +using Unity.Netcode; // NGO 필수 네임스페이스 +using Unity.Netcode.Components; + +[RequireComponent(typeof(NetworkObject))] +public class PlayerNetworkController : NetworkBehaviour +{ + [Header("Movement Settings")] + public float moveSpeed = 5f; + public float rotationSpeed = 10f; + public float jumpHeight = 1.5f; + public float gravity = -19.62f; + + [Header("Interaction Settings")] + [SerializeField] private float interactRange = 3f; + [SerializeField] private LayerMask interactableLayer; + [SerializeField] private LayerMask constructionLayer; + [SerializeField] private float buildSpeedMultiplier = 2f; + + [Header("Mining Settings")] + [SerializeField] private float attackRange = 1.5f; + [SerializeField] private int miningDamage = 25; + [SerializeField] private LayerMask mineableLayer; // 'Mineable' 레이어 설정 필요 + + private CharacterController _controller; + private PlayerInputActions _inputActions; + private Animator _animator; + private TunnelTraveler _traveler; + + private Vector2 _moveInput; + private Vector3 _velocity; + private Vector3 _currentMoveDir; + private bool _isGrounded; + private bool _isHoldingInteract = false; + + // NGO에서 Start 대신 사용하는 네트워크 초기화 메서드 + public override void OnNetworkSpawn() + { + // 내 캐릭터가 아니라면 입력을 활성화하지 않습니다. + if (!IsOwner) return; + + _inputActions = new PlayerInputActions(); + _inputActions.Player.Jump.performed += ctx => OnJump(); + _inputActions.Player.Attack.performed += ctx => OnAttackServerRpc(); // 서버에 공격 요청 + _inputActions.Player.Interact.performed += ctx => OnInteractTap(); + + _inputActions.Player.Interact.started += ctx => _isHoldingInteract = true; + _inputActions.Player.Interact.canceled += ctx => _isHoldingInteract = false; + + _inputActions.Enable(); + } + + void Awake() + { + _controller = GetComponent(); + _animator = GetComponent(); + _traveler = GetComponent(); + } + + void Update() + { + // [중요] '나'의 캐릭터가 아니면 조종 로직을 아예 실행하지 않습니다. + if (!IsOwner) return; + if (_traveler != null && _traveler.IsTraveling) return; + + HandleGravity(); + HandleMovement(); + + // 건설 가속 로직 + if (_isHoldingInteract) PerformConstructionSupport(); + } + + private void HandleMovement() + { + _isGrounded = _controller.isGrounded; + _animator.SetBool("isGrounded", _isGrounded); + + bool isAttacking = _animator.GetCurrentAnimatorStateInfo(0).IsTag("Attack"); + _moveInput = _inputActions.Player.Move.ReadValue(); + Vector3 move = new Vector3(_moveInput.x, 0, _moveInput.y).normalized; + + // 지상/공중 및 공격 중 관성 처리 + if (isAttacking) move = _isGrounded ? Vector3.zero : _currentMoveDir; + else if (move.magnitude > 0.1f) _currentMoveDir = move; + + if (move.magnitude >= 0.1f) + { + if (!isAttacking) + { + Quaternion targetRotation = Quaternion.LookRotation(move); + transform.rotation = Quaternion.Slerp(transform.rotation, targetRotation, rotationSpeed * Time.deltaTime); + } + _controller.Move(move * moveSpeed * Time.deltaTime); + } + + _animator.SetFloat("MoveSpeed", isAttacking && _isGrounded ? 0 : move.magnitude); + } + + private void HandleGravity() + { + if (_isGrounded && _velocity.y < 0) _velocity.y = -2f; + _velocity.y += gravity * Time.deltaTime; + _controller.Move(_velocity * Time.deltaTime); + } + + private void OnJump() + { + if (_isGrounded) _velocity.y = Mathf.Sqrt(jumpHeight * -2f * gravity); + } + + // 기존 OnAttackServerRpc를 수정하거나 호출되는 시점에 아래 로직 포함 + [Rpc(SendTo.Server, InvokePermission = RpcInvokePermission.Owner)] + private void OnAttackServerRpc() + { + // 모든 유저에게 애니메이션 재생 신호 전송 + OnAttackClientRpc(); + + // [채광 판정] 서버에서 물리 연산을 통해 전방의 블록 탐색 + Collider[] hitBlocks = Physics.OverlapSphere(transform.position + transform.forward, attackRange, mineableLayer); + + foreach (var col in hitBlocks) + { + MineableBlock block = col.GetComponentInParent(); + if (block != null) + { + // 서버가 직접 블록의 대미지 함수 호출 + block.TakeDamageRpc(miningDamage); + } + } + } + + [ClientRpc] + private void OnAttackClientRpc() + { + _animator.SetTrigger("Attack"); + } + + private void OnInteractTap() + { + _animator.SetTrigger("Interact"); + + Collider[] colliders = Physics.OverlapSphere(transform.position, interactRange, interactableLayer); + foreach (var col in colliders) + { + IInteractable interactable = col.GetComponentInParent(); + if (interactable != null) + { + interactable.Interact(gameObject); + break; + } + } + } + + private void PerformConstructionSupport() + { + Collider[] targets = Physics.OverlapSphere(transform.position, interactRange, constructionLayer); + foreach (var col in targets) + { + ConstructionSite site = col.GetComponentInParent(); + if (site != null) + { + // 건설 진행도는 서버에서 관리하는 것이 안전하므로 나중에 RPC로 전환 필요 + site.AdvanceConstruction(Time.deltaTime * buildSpeedMultiplier); + } + } + } + + public override void OnNetworkDespawn() + { + if (IsOwner) _inputActions.Disable(); + } +} \ No newline at end of file diff --git a/Assets/Scripts/Player/PlayerNetworkController.cs.meta b/Assets/Scripts/Player/PlayerNetworkController.cs.meta new file mode 100644 index 0000000..1d44693 --- /dev/null +++ b/Assets/Scripts/Player/PlayerNetworkController.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: a5866e584e3482645a906bd152cd00fe \ No newline at end of file diff --git a/Assets/Scripts/Tower/ConstructionSite.cs b/Assets/Scripts/Tower/ConstructionSite.cs index 3969ad4..b5c7dac 100644 --- a/Assets/Scripts/Tower/ConstructionSite.cs +++ b/Assets/Scripts/Tower/ConstructionSite.cs @@ -1,56 +1,45 @@ using UnityEngine; +using Unity.Netcode; -public class ConstructionSite : MonoBehaviour +public class ConstructionSite : NetworkBehaviour { - private GameObject _finalPrefab; - private float _buildTime; - private float _timer; + private NetworkVariable _currentTimer = new NetworkVariable(0f); + private NetworkVariable _syncTurretIndex = new NetworkVariable(); private Vector3Int _gridPos; - private bool _isCompleted = false; // 중복 완공 방지 플래그 + private float _targetBuildTime; + private bool _isCompleted = false; - public void Initialize(GameObject final, float time, Vector3Int pos) + public void Initialize(int index, Vector3Int pos) { - _finalPrefab = final; - _buildTime = time; + if (!IsServer) return; + _syncTurretIndex.Value = index; _gridPos = pos; - _timer = 0; - _isCompleted = false; + _targetBuildTime = BuildManager.Instance.GetTurretData(index).buildTime; } void Update() { - if (_isCompleted) return; + if (!IsServer || _isCompleted) return; - // 매 프레임 자동으로 시간이 흐름 - _timer += Time.deltaTime; - if (_timer >= _buildTime) Complete(); + _currentTimer.Value += Time.deltaTime; + if (_currentTimer.Value >= _targetBuildTime) CompleteBuild(); } - // [핵심] 플레이어가 상호작용 버튼을 꾹 누를 때 호출되는 함수 - public void AdvanceConstruction(float amount) + public void AdvanceConstruction(float amount) => AdvanceBuildRpc(amount); + + [Rpc(SendTo.Server, InvokePermission = RpcInvokePermission.Everyone)] + private void AdvanceBuildRpc(float amount) => _currentTimer.Value += amount; + + private void CompleteBuild() { - if (_isCompleted) return; + _isCompleted = true; + var data = BuildManager.Instance.GetTurretData(_syncTurretIndex.Value); - _timer += amount; - if (_timer >= _buildTime) Complete(); - } + // [중요] 저장된 그리드 좌표로부터 정확한 월드 좌표 복원 + Vector3 finalPos = BuildManager.Instance.GridToWorld(_gridPos); + GameObject finalObj = Instantiate(data.finalPrefab, finalPos, Quaternion.identity); - private void Complete() - { - // 1. 터널 생성 - GameObject tunnel = Instantiate(_finalPrefab, transform.position, Quaternion.identity); - TunnelNode node = tunnel.GetComponentInChildren(); - - if (node != null) - { - // 2. [수정] 완공된 터널의 루트 위치로 좌표 계산 - Vector3Int myGridPos = BuildManager.Instance.WorldToGrid3D(tunnel.transform.position); - - // 3. 레지스트리 등록 및 연결 - BuildManager.Instance.RegisterTunnel(myGridPos, node); - node.LinkVertical(); - } - - Destroy(gameObject); + finalObj.GetComponent().Spawn(); + GetComponent().Despawn(); } } \ No newline at end of file diff --git a/Assets/Scripts/TunnelNode.cs b/Assets/Scripts/TunnelNode.cs index 4c54838..492d679 100644 --- a/Assets/Scripts/TunnelNode.cs +++ b/Assets/Scripts/TunnelNode.cs @@ -1,58 +1,34 @@ using UnityEngine; +using Unity.Netcode; -public class TunnelNode : MonoBehaviour, IInteractable +public class TunnelNode : NetworkBehaviour, IInteractable { public TunnelNode aboveNode; public TunnelNode belowNode; - // [중요] 이 노드가 속한 터널의 최상단 부모를 캐싱합니다. - private Transform _tunnelRoot; - - void Awake() + public override void OnNetworkSpawn() { - // 이름이 "Tunnel"로 시작하는 부모를 찾거나, 단순히 부모의 부모를 참조합니다. - // 여기서는 이미지 구조에 맞게 부모(Visual)의 부모(Tunnel (1))를 찾습니다. - _tunnelRoot = transform.parent.parent; + // 모든 클라이언트에서 각자 장부에 등록 + Vector3Int myPos = BuildManager.Instance.WorldToGrid3D(transform.position); + BuildManager.Instance.RegisterTunnel(myPos, this); + + // 모든 노드가 등록될 시간을 벌기 위해 서버에서 약간 지연 후 연결 명령 + if (IsServer) Invoke(nameof(SyncLinks), 0.2f); } + private void SyncLinks() => LinkVerticalRpc(); + + [Rpc(SendTo.Everyone)] + private void LinkVerticalRpc() => LinkVertical(); + public void LinkVertical() { - // 루트(Tunnel 1)의 위치로 내 위치 파악 - Transform myRoot = transform.parent.parent; - Vector3Int myPos = BuildManager.Instance.WorldToGrid3D(myRoot.position); + Vector3Int myPos = BuildManager.Instance.WorldToGrid3D(transform.position); + aboveNode = BuildManager.Instance.GetTunnelAt(myPos + Vector3Int.up); + belowNode = BuildManager.Instance.GetTunnelAt(myPos + Vector3Int.down); - // 위/아래 터널 찾기 - TunnelNode targetAbove = BuildManager.Instance.GetTunnelAt(myPos + Vector3Int.up); - TunnelNode targetBelow = BuildManager.Instance.GetTunnelAt(myPos + Vector3Int.down); - - if (targetAbove != null) - { - this.aboveNode = targetAbove; - targetAbove.belowNode = this; // 상대방의 아래도 나로 설정 (양방향) - } - - if (targetBelow != null) - { - this.belowNode = targetBelow; - targetBelow.aboveNode = this; // 상대방의 위도 나로 설정 (양방향) - } - } - - private void OnDrawGizmos() - { - // 연결되었다면 Scene 뷰에서 선을 그림 - if (aboveNode != null) - { - Gizmos.color = Color.blue; - Gizmos.DrawLine(transform.position, aboveNode.transform.position); - Gizmos.DrawSphere(aboveNode.transform.position, 0.2f); - } - if (belowNode != null) - { - Gizmos.color = Color.cyan; - Gizmos.DrawLine(transform.position, belowNode.transform.position); - Gizmos.DrawSphere(belowNode.transform.position, 0.2f); - } + if (aboveNode != null) aboveNode.belowNode = this; + if (belowNode != null) belowNode.aboveNode = this; } public void Interact(GameObject user) diff --git a/Assets/UserChoices.choices b/Assets/UserChoices.choices new file mode 100644 index 0000000..317f87b --- /dev/null +++ b/Assets/UserChoices.choices @@ -0,0 +1,36 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &1 +MonoBehaviour: + m_ObjectHideFlags: 53 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 18cde282a8d045bf9d245fdcfaa7271b, type: 3} + m_Name: + m_EditorClassIdentifier: Unity.Multiplayer.Center.Editor::Unity.Multiplayer.Center.Questionnaire.UserChoicesObject + QuestionnaireVersion: 1.3 + UserAnswers: + Answers: + - QuestionId: Pace + Answers: + - Slow + - QuestionId: Cheating + Answers: + - CheatingNotImportant + - QuestionId: CostSensitivity + Answers: + - BestMargin + - QuestionId: NetcodeArchitecture + Answers: + - ClientServer + - QuestionId: PlayerCount + Answers: + - 4 + Preset: 11 + SelectedSolutions: + SelectedHostingModel: 4 + SelectedNetcodeSolution: 1 diff --git a/Assets/UserChoices.choices.meta b/Assets/UserChoices.choices.meta new file mode 100644 index 0000000..c77f1a7 --- /dev/null +++ b/Assets/UserChoices.choices.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ad2143a09e50cd84fa376cd4e24fb6e4 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/manifest.json b/Packages/manifest.json index aec2533..814183a 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -19,7 +19,13 @@ "com.unity.ide.visualstudio": "2.0.26", "com.unity.inputsystem": "1.17.0", "com.unity.multiplayer.center": "1.0.1", + "com.unity.multiplayer.center.quickstart": "1.1.1", + "com.unity.multiplayer.playmode": "2.0.1", + "com.unity.multiplayer.tools": "2.2.7", + "com.unity.netcode.gameobjects": "2.8.0", "com.unity.render-pipelines.universal": "17.3.0", + "com.unity.services.multiplayer": "2.0.0", + "com.unity.services.vivox": "16.9.0", "com.unity.test-framework": "1.6.0", "com.unity.timeline": "1.8.10", "com.unity.ugui": "2.0.0", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index af9f9fe..47009a5 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -280,9 +280,53 @@ "com.unity.modules.uielements": "1.0.0" } }, + "com.unity.multiplayer.center.quickstart": { + "version": "1.1.1", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.modules.uielements": "1.0.0", + "com.unity.multiplayer.center": "1.0.0" + }, + "url": "https://packages.unity.com" + }, + "com.unity.multiplayer.playmode": { + "version": "2.0.1", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.nuget.newtonsoft-json": "2.0.2" + }, + "url": "https://packages.unity.com" + }, + "com.unity.multiplayer.tools": { + "version": "2.2.7", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.burst": "1.8.18", + "com.unity.collections": "2.5.1", + "com.unity.mathematics": "1.3.2", + "com.unity.profiling.core": "1.0.2", + "com.unity.nuget.mono-cecil": "1.11.4", + "com.unity.modules.uielements": "1.0.0", + "com.unity.nuget.newtonsoft-json": "3.2.1" + }, + "url": "https://packages.unity.com" + }, + "com.unity.netcode.gameobjects": { + "version": "2.8.0", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.transport": "2.6.0", + "com.unity.nuget.mono-cecil": "1.11.4" + }, + "url": "https://packages.unity.com" + }, "com.unity.nuget.mono-cecil": { "version": "1.11.6", - "depth": 2, + "depth": 1, "source": "registry", "dependencies": {}, "url": "https://packages.unity.com" @@ -294,6 +338,13 @@ "dependencies": {}, "url": "https://packages.unity.com" }, + "com.unity.profiling.core": { + "version": "1.0.3", + "depth": 1, + "source": "registry", + "dependencies": {}, + "url": "https://packages.unity.com" + }, "com.unity.render-pipelines.core": { "version": "17.3.0", "depth": 1, @@ -343,6 +394,99 @@ }, "url": "https://packages.unity.com" }, + "com.unity.services.authentication": { + "version": "3.5.2", + "depth": 1, + "source": "registry", + "dependencies": { + "com.unity.ugui": "1.0.0", + "com.unity.services.core": "1.15.1", + "com.unity.nuget.newtonsoft-json": "3.2.1", + "com.unity.modules.unitywebrequest": "1.0.0" + }, + "url": "https://packages.unity.com" + }, + "com.unity.services.core": { + "version": "1.16.0", + "depth": 1, + "source": "registry", + "dependencies": { + "com.unity.modules.androidjni": "1.0.0", + "com.unity.nuget.newtonsoft-json": "3.2.1", + "com.unity.modules.unitywebrequest": "1.0.0" + }, + "url": "https://packages.unity.com" + }, + "com.unity.services.deployment": { + "version": "1.6.2", + "depth": 1, + "source": "registry", + "dependencies": { + "com.unity.services.core": "1.15.1", + "com.unity.services.deployment.api": "1.1.2" + }, + "url": "https://packages.unity.com" + }, + "com.unity.services.deployment.api": { + "version": "1.1.3", + "depth": 2, + "source": "registry", + "dependencies": {}, + "url": "https://packages.unity.com" + }, + "com.unity.services.multiplayer": { + "version": "2.0.0", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.transport": "2.5.0", + "com.unity.collections": "2.2.1", + "com.unity.services.qos": "1.3.0", + "com.unity.services.core": "1.15.1", + "com.unity.services.wire": "1.4.0", + "com.unity.services.deployment": "1.6.2", + "com.unity.nuget.newtonsoft-json": "3.2.1", + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.services.authentication": "3.5.1" + }, + "url": "https://packages.unity.com" + }, + "com.unity.services.qos": { + "version": "1.4.1", + "depth": 1, + "source": "registry", + "dependencies": { + "com.unity.collections": "1.2.4", + "com.unity.services.core": "1.12.5", + "com.unity.nuget.newtonsoft-json": "3.0.2", + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.services.authentication": "3.5.2" + }, + "url": "https://packages.unity.com" + }, + "com.unity.services.vivox": { + "version": "16.9.0", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.modules.audio": "1.0.0", + "com.unity.services.core": "1.14.0", + "com.unity.settings-manager": "1.0.3", + "com.unity.nuget.newtonsoft-json": "3.0.2" + }, + "url": "https://packages.unity.com" + }, + "com.unity.services.wire": { + "version": "1.4.1", + "depth": 1, + "source": "registry", + "dependencies": { + "com.unity.services.core": "1.12.5", + "com.unity.nuget.newtonsoft-json": "3.2.1", + "com.unity.services.authentication": "2.7.4" + }, + "url": "https://packages.unity.com" + }, "com.unity.settings-manager": { "version": "2.1.1", "depth": 1, @@ -402,6 +546,17 @@ }, "url": "https://packages.unity.com" }, + "com.unity.transport": { + "version": "2.6.0", + "depth": 1, + "source": "registry", + "dependencies": { + "com.unity.burst": "1.8.24", + "com.unity.collections": "2.2.1", + "com.unity.mathematics": "1.3.2" + }, + "url": "https://packages.unity.com" + }, "com.unity.ugui": { "version": "2.0.0", "depth": 0, diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index dda3ab1..4db5024 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -8,6 +8,9 @@ EditorBuildSettings: - enabled: 1 path: Assets/Scenes/SampleScene.unity guid: 8c9cfa26abfee488c85f1582747f6a02 + - enabled: 1 + path: Assets/Scenes/DefenceScene.unity + guid: c46860faadd6f944b98633b1e6c3c6de m_configObjects: com.unity.dt.app-ui: {fileID: 11400000, guid: 1b1c20d82303e4b5781c3ef50ac1449f, type: 2} com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3} diff --git a/ProjectSettings/Packages/com.unity.multiplayer.tools/CustomColorSettings.asset b/ProjectSettings/Packages/com.unity.multiplayer.tools/CustomColorSettings.asset new file mode 100644 index 0000000..ee86020 --- /dev/null +++ b/ProjectSettings/Packages/com.unity.multiplayer.tools/CustomColorSettings.asset @@ -0,0 +1,17 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &1 +MonoBehaviour: + m_ObjectHideFlags: 53 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6762c37d3236e2a4382cd018dcdf221e, type: 3} + m_Name: + m_EditorClassIdentifier: Unity.Multiplayer.Tools.Common::Unity.Multiplayer.Tools.Common.Visualization.CustomColorSettings + colors: + m_Keys: + m_Values: [] diff --git a/ProjectSettings/Packages/com.unity.services.vivox/Settings.json b/ProjectSettings/Packages/com.unity.services.vivox/Settings.json new file mode 100644 index 0000000..3c7b4c1 --- /dev/null +++ b/ProjectSettings/Packages/com.unity.services.vivox/Settings.json @@ -0,0 +1,5 @@ +{ + "m_Dictionary": { + "m_DictionaryValues": [] + } +} \ No newline at end of file diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index 7b64868..66c37ed 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -20,7 +20,7 @@ TagManager: - Player - Interactable - Tunnel - - + - Mineable - - - diff --git a/ProjectSettings/VirtualProjectsConfig.json b/ProjectSettings/VirtualProjectsConfig.json new file mode 100644 index 0000000..a23bef1 --- /dev/null +++ b/ProjectSettings/VirtualProjectsConfig.json @@ -0,0 +1,4 @@ +{ + "PlayerTags": [], + "version": "6000.3.3f1" +} \ No newline at end of file