diff --git a/Assembly-CSharp.csproj b/Assembly-CSharp.csproj index 0d955b0..197adc2 100644 --- a/Assembly-CSharp.csproj +++ b/Assembly-CSharp.csproj @@ -54,6 +54,7 @@ + @@ -70,6 +71,7 @@ + diff --git a/Assets/Animations/PlayerAnimationController.controller b/Assets/Animations/PlayerAnimationController.controller index 06e9a3b..0d8ad74 100644 --- a/Assets/Animations/PlayerAnimationController.controller +++ b/Assets/Animations/PlayerAnimationController.controller @@ -229,7 +229,7 @@ AnimatorState: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Mining - m_Speed: 1 + m_Speed: 2 m_CycleOffset: 0 m_Transitions: - {fileID: -7535493336948512429} diff --git a/Assets/Data/BuildingData.asset b/Assets/Data/BuildingData.asset index 08d9b1b..8cb88d8 100644 --- a/Assets/Data/BuildingData.asset +++ b/Assets/Data/BuildingData.asset @@ -14,6 +14,7 @@ MonoBehaviour: m_EditorClassIdentifier: Assembly-CSharp::Northbound.BuildingData buildingName: Wall prefab: {fileID: 2938167817760513538, guid: 04e95700704d92248b63ce5674bd9638, type: 3} + icon: {fileID: 0} width: 16 length: 4 height: 4 @@ -21,7 +22,13 @@ MonoBehaviour: allowRotation: 1 requiredWorkAmount: 100 workPerInteraction: 10 - interactionCooldown: 1 + interactionCooldown: 0 + constructionAnimationTrigger: Mining + constructionEquipment: + socketName: handslot.r + equipmentPrefab: {fileID: 919132149155446097, guid: 804d477fc7f114c498aa6f95452be893, type: 3} + attachOnStart: 1 + detachOnEnd: 1 maxHealth: 100 isIndestructible: 0 autoRegenerate: 0 diff --git a/Assets/External/button_default.png b/Assets/External/button_default.png new file mode 100644 index 0000000..dc3cdd8 Binary files /dev/null and b/Assets/External/button_default.png differ diff --git a/Assets/External/button_default.png.meta b/Assets/External/button_default.png.meta new file mode 100644 index 0000000..fc68872 --- /dev/null +++ b/Assets/External/button_default.png.meta @@ -0,0 +1,156 @@ +fileFormatVersion: 2 +guid: e713d4394d6c5914eb4b8aa2aafe5429 +TextureImporter: + internalIDToNameTable: + - first: + 213: -2771146889623541776 + second: button_default_0 + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 2 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: + - serializedVersion: 2 + name: button_default_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 256 + height: 256 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 0f76f870698ea89d0800000000000000 + internalID: -2771146889623541776 + vertices: [] + indices: + edges: [] + weights: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: + button_default_0: -2771146889623541776 + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/InputSystem_Actions.cs b/Assets/InputSystem_Actions.cs index dbb3461..aeff3af 100644 --- a/Assets/InputSystem_Actions.cs +++ b/Assets/InputSystem_Actions.cs @@ -199,6 +199,78 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable ""processors"": """", ""interactions"": """", ""initialStateCheck"": false + }, + { + ""name"": ""QuickSlot1"", + ""type"": ""Button"", + ""id"": ""a2770ad5-abea-4586-89d3-abe1f089a700"", + ""expectedControlType"": """", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false + }, + { + ""name"": ""QuickSlot2"", + ""type"": ""Button"", + ""id"": ""3cb693ce-bffe-45a4-8da4-a559ae530b14"", + ""expectedControlType"": """", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false + }, + { + ""name"": ""QuickSlot3"", + ""type"": ""Button"", + ""id"": ""2567af20-ee99-4dcd-ae99-054518802343"", + ""expectedControlType"": """", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false + }, + { + ""name"": ""QuickSlot4"", + ""type"": ""Button"", + ""id"": ""6755ed3b-f228-4721-9190-49951c828334"", + ""expectedControlType"": """", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false + }, + { + ""name"": ""QuickSlot5"", + ""type"": ""Button"", + ""id"": ""29e349bf-7b0a-4697-b3d4-de9b2fcb40e7"", + ""expectedControlType"": """", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false + }, + { + ""name"": ""QuickSlot6"", + ""type"": ""Button"", + ""id"": ""ab1ff2fb-1ae4-4554-8e59-51d5df769d09"", + ""expectedControlType"": """", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false + }, + { + ""name"": ""QuickSlot7"", + ""type"": ""Button"", + ""id"": ""76ca934f-b1b5-4713-bb89-ead70f878105"", + ""expectedControlType"": """", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false + }, + { + ""name"": ""QuickSlot8"", + ""type"": ""Button"", + ""id"": ""75c85d75-4924-45b9-b136-02dff28bb4fd"", + ""expectedControlType"": """", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false } ], ""bindings"": [ @@ -619,6 +691,94 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable ""action"": ""Build"", ""isComposite"": false, ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""de0e54c7-cb32-4c9e-867b-291bd28c0683"", + ""path"": ""/1"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Keyboard&Mouse"", + ""action"": ""QuickSlot1"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""a288feb3-0ce0-49f9-a1a4-7353aeeab7fb"", + ""path"": ""/2"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Keyboard&Mouse"", + ""action"": ""QuickSlot2"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""90bf2585-bb5e-4faf-9136-fd1220ade8c9"", + ""path"": ""/3"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Keyboard&Mouse"", + ""action"": ""QuickSlot3"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""82326dad-afdc-4287-a4e9-4827820192bc"", + ""path"": ""/4"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Keyboard&Mouse"", + ""action"": ""QuickSlot4"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""591efa08-5304-4c8e-b41e-dea9549877d5"", + ""path"": ""/5"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Keyboard&Mouse"", + ""action"": ""QuickSlot5"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""3d5537cc-1e13-4126-bdbe-2b29a87bd554"", + ""path"": ""/6"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Keyboard&Mouse"", + ""action"": ""QuickSlot6"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""5b7e3c99-0c87-45d9-be22-070abf3eaa9e"", + ""path"": ""/7"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Keyboard&Mouse"", + ""action"": ""QuickSlot7"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""596e0582-4f59-497e-a75b-0fbd4515b931"", + ""path"": ""/8"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Keyboard&Mouse"", + ""action"": ""QuickSlot8"", + ""isComposite"": false, + ""isPartOfComposite"": false } ] }, @@ -1216,6 +1376,14 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable m_Player_ToggleBuildMode = m_Player.FindAction("Toggle Build Mode", throwIfNotFound: true); m_Player_Rotate = m_Player.FindAction("Rotate", throwIfNotFound: true); m_Player_Build = m_Player.FindAction("Build", throwIfNotFound: true); + m_Player_QuickSlot1 = m_Player.FindAction("QuickSlot1", throwIfNotFound: true); + m_Player_QuickSlot2 = m_Player.FindAction("QuickSlot2", throwIfNotFound: true); + m_Player_QuickSlot3 = m_Player.FindAction("QuickSlot3", throwIfNotFound: true); + m_Player_QuickSlot4 = m_Player.FindAction("QuickSlot4", throwIfNotFound: true); + m_Player_QuickSlot5 = m_Player.FindAction("QuickSlot5", throwIfNotFound: true); + m_Player_QuickSlot6 = m_Player.FindAction("QuickSlot6", throwIfNotFound: true); + m_Player_QuickSlot7 = m_Player.FindAction("QuickSlot7", throwIfNotFound: true); + m_Player_QuickSlot8 = m_Player.FindAction("QuickSlot8", throwIfNotFound: true); // UI m_UI = asset.FindActionMap("UI", throwIfNotFound: true); m_UI_Navigate = m_UI.FindAction("Navigate", throwIfNotFound: true); @@ -1321,6 +1489,14 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable private readonly InputAction m_Player_ToggleBuildMode; private readonly InputAction m_Player_Rotate; private readonly InputAction m_Player_Build; + private readonly InputAction m_Player_QuickSlot1; + private readonly InputAction m_Player_QuickSlot2; + private readonly InputAction m_Player_QuickSlot3; + private readonly InputAction m_Player_QuickSlot4; + private readonly InputAction m_Player_QuickSlot5; + private readonly InputAction m_Player_QuickSlot6; + private readonly InputAction m_Player_QuickSlot7; + private readonly InputAction m_Player_QuickSlot8; /// /// Provides access to input actions defined in input action map "Player". /// @@ -1381,6 +1557,38 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable /// public InputAction @Build => m_Wrapper.m_Player_Build; /// + /// Provides access to the underlying input action "Player/QuickSlot1". + /// + public InputAction @QuickSlot1 => m_Wrapper.m_Player_QuickSlot1; + /// + /// Provides access to the underlying input action "Player/QuickSlot2". + /// + public InputAction @QuickSlot2 => m_Wrapper.m_Player_QuickSlot2; + /// + /// Provides access to the underlying input action "Player/QuickSlot3". + /// + public InputAction @QuickSlot3 => m_Wrapper.m_Player_QuickSlot3; + /// + /// Provides access to the underlying input action "Player/QuickSlot4". + /// + public InputAction @QuickSlot4 => m_Wrapper.m_Player_QuickSlot4; + /// + /// Provides access to the underlying input action "Player/QuickSlot5". + /// + public InputAction @QuickSlot5 => m_Wrapper.m_Player_QuickSlot5; + /// + /// Provides access to the underlying input action "Player/QuickSlot6". + /// + public InputAction @QuickSlot6 => m_Wrapper.m_Player_QuickSlot6; + /// + /// Provides access to the underlying input action "Player/QuickSlot7". + /// + public InputAction @QuickSlot7 => m_Wrapper.m_Player_QuickSlot7; + /// + /// Provides access to the underlying input action "Player/QuickSlot8". + /// + public InputAction @QuickSlot8 => m_Wrapper.m_Player_QuickSlot8; + /// /// Provides access to the underlying input action map instance. /// public InputActionMap Get() { return m_Wrapper.m_Player; } @@ -1442,6 +1650,30 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable @Build.started += instance.OnBuild; @Build.performed += instance.OnBuild; @Build.canceled += instance.OnBuild; + @QuickSlot1.started += instance.OnQuickSlot1; + @QuickSlot1.performed += instance.OnQuickSlot1; + @QuickSlot1.canceled += instance.OnQuickSlot1; + @QuickSlot2.started += instance.OnQuickSlot2; + @QuickSlot2.performed += instance.OnQuickSlot2; + @QuickSlot2.canceled += instance.OnQuickSlot2; + @QuickSlot3.started += instance.OnQuickSlot3; + @QuickSlot3.performed += instance.OnQuickSlot3; + @QuickSlot3.canceled += instance.OnQuickSlot3; + @QuickSlot4.started += instance.OnQuickSlot4; + @QuickSlot4.performed += instance.OnQuickSlot4; + @QuickSlot4.canceled += instance.OnQuickSlot4; + @QuickSlot5.started += instance.OnQuickSlot5; + @QuickSlot5.performed += instance.OnQuickSlot5; + @QuickSlot5.canceled += instance.OnQuickSlot5; + @QuickSlot6.started += instance.OnQuickSlot6; + @QuickSlot6.performed += instance.OnQuickSlot6; + @QuickSlot6.canceled += instance.OnQuickSlot6; + @QuickSlot7.started += instance.OnQuickSlot7; + @QuickSlot7.performed += instance.OnQuickSlot7; + @QuickSlot7.canceled += instance.OnQuickSlot7; + @QuickSlot8.started += instance.OnQuickSlot8; + @QuickSlot8.performed += instance.OnQuickSlot8; + @QuickSlot8.canceled += instance.OnQuickSlot8; } /// @@ -1489,6 +1721,30 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable @Build.started -= instance.OnBuild; @Build.performed -= instance.OnBuild; @Build.canceled -= instance.OnBuild; + @QuickSlot1.started -= instance.OnQuickSlot1; + @QuickSlot1.performed -= instance.OnQuickSlot1; + @QuickSlot1.canceled -= instance.OnQuickSlot1; + @QuickSlot2.started -= instance.OnQuickSlot2; + @QuickSlot2.performed -= instance.OnQuickSlot2; + @QuickSlot2.canceled -= instance.OnQuickSlot2; + @QuickSlot3.started -= instance.OnQuickSlot3; + @QuickSlot3.performed -= instance.OnQuickSlot3; + @QuickSlot3.canceled -= instance.OnQuickSlot3; + @QuickSlot4.started -= instance.OnQuickSlot4; + @QuickSlot4.performed -= instance.OnQuickSlot4; + @QuickSlot4.canceled -= instance.OnQuickSlot4; + @QuickSlot5.started -= instance.OnQuickSlot5; + @QuickSlot5.performed -= instance.OnQuickSlot5; + @QuickSlot5.canceled -= instance.OnQuickSlot5; + @QuickSlot6.started -= instance.OnQuickSlot6; + @QuickSlot6.performed -= instance.OnQuickSlot6; + @QuickSlot6.canceled -= instance.OnQuickSlot6; + @QuickSlot7.started -= instance.OnQuickSlot7; + @QuickSlot7.performed -= instance.OnQuickSlot7; + @QuickSlot7.canceled -= instance.OnQuickSlot7; + @QuickSlot8.started -= instance.OnQuickSlot8; + @QuickSlot8.performed -= instance.OnQuickSlot8; + @QuickSlot8.canceled -= instance.OnQuickSlot8; } /// @@ -1873,6 +2129,62 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable /// /// void OnBuild(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "QuickSlot1" is either , or . + /// + /// + /// + /// + void OnQuickSlot1(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "QuickSlot2" is either , or . + /// + /// + /// + /// + void OnQuickSlot2(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "QuickSlot3" is either , or . + /// + /// + /// + /// + void OnQuickSlot3(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "QuickSlot4" is either , or . + /// + /// + /// + /// + void OnQuickSlot4(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "QuickSlot5" is either , or . + /// + /// + /// + /// + void OnQuickSlot5(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "QuickSlot6" is either , or . + /// + /// + /// + /// + void OnQuickSlot6(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "QuickSlot7" is either , or . + /// + /// + /// + /// + void OnQuickSlot7(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "QuickSlot8" is either , or . + /// + /// + /// + /// + void OnQuickSlot8(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 136eaac..82c1416 100644 --- a/Assets/InputSystem_Actions.inputactions +++ b/Assets/InputSystem_Actions.inputactions @@ -113,6 +113,78 @@ "processors": "", "interactions": "", "initialStateCheck": false + }, + { + "name": "QuickSlot1", + "type": "Button", + "id": "a2770ad5-abea-4586-89d3-abe1f089a700", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "QuickSlot2", + "type": "Button", + "id": "3cb693ce-bffe-45a4-8da4-a559ae530b14", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "QuickSlot3", + "type": "Button", + "id": "2567af20-ee99-4dcd-ae99-054518802343", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "QuickSlot4", + "type": "Button", + "id": "6755ed3b-f228-4721-9190-49951c828334", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "QuickSlot5", + "type": "Button", + "id": "29e349bf-7b0a-4697-b3d4-de9b2fcb40e7", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "QuickSlot6", + "type": "Button", + "id": "ab1ff2fb-1ae4-4554-8e59-51d5df769d09", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "QuickSlot7", + "type": "Button", + "id": "76ca934f-b1b5-4713-bb89-ead70f878105", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "QuickSlot8", + "type": "Button", + "id": "75c85d75-4924-45b9-b136-02dff28bb4fd", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false } ], "bindings": [ @@ -533,6 +605,94 @@ "action": "Build", "isComposite": false, "isPartOfComposite": false + }, + { + "name": "", + "id": "de0e54c7-cb32-4c9e-867b-291bd28c0683", + "path": "/1", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "QuickSlot1", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "a288feb3-0ce0-49f9-a1a4-7353aeeab7fb", + "path": "/2", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "QuickSlot2", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "90bf2585-bb5e-4faf-9136-fd1220ade8c9", + "path": "/3", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "QuickSlot3", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "82326dad-afdc-4287-a4e9-4827820192bc", + "path": "/4", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "QuickSlot4", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "591efa08-5304-4c8e-b41e-dea9549877d5", + "path": "/5", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "QuickSlot5", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "3d5537cc-1e13-4126-bdbe-2b29a87bd554", + "path": "/6", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "QuickSlot6", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "5b7e3c99-0c87-45d9-be22-070abf3eaa9e", + "path": "/7", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "QuickSlot7", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "596e0582-4f59-497e-a75b-0fbd4515b931", + "path": "/8", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "QuickSlot8", + "isComposite": false, + "isPartOfComposite": false } ] }, diff --git a/Assets/Prefabs/BuildingSlotButton.prefab b/Assets/Prefabs/BuildingSlotButton.prefab new file mode 100644 index 0000000..9f9fe59 --- /dev/null +++ b/Assets/Prefabs/BuildingSlotButton.prefab @@ -0,0 +1,530 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &839359848106654382 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8002473853090050447} + - component: {fileID: 3629819156144026533} + - component: {fileID: 7255687967647854611} + m_Layer: 5 + m_Name: HotkeyText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8002473853090050447 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 839359848106654382} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6557039598812214310} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 5, y: -5} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3629819156144026533 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 839359848106654382} + m_CullTransparentMesh: 1 +--- !u!114 &7255687967647854611 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 839359848106654382} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: 1 + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 52310d2f5a2eaaf49bdaf92c08c5eb78, type: 2} + m_sharedMaterial: {fileID: 3669596862895025436, guid: 52310d2f5a2eaaf49bdaf92c08c5eb78, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4278255615 + m_fontColor: {r: 1, g: 1, b: 0, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 14 + m_fontSizeBase: 14 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 1 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_characterHorizontalScale: 1 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &3177185491562410701 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6557039598812214310} + - component: {fileID: 5788101936939836566} + - component: {fileID: 2528055724837407497} + - component: {fileID: 5767751339082063307} + - component: {fileID: 4535838851163113075} + - component: {fileID: 3505625079546582005} + - component: {fileID: 288246739155426764} + m_Layer: 5 + m_Name: BuildingSlotButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6557039598812214310 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3177185491562410701} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 9129141957646790745} + - {fileID: 8859221909843448331} + - {fileID: 8002473853090050447} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 80, y: 80} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5788101936939836566 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3177185491562410701} + m_CullTransparentMesh: 1 +--- !u!114 &2528055724837407497 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3177185491562410701} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: -2771146889623541776, guid: e713d4394d6c5914eb4b8aa2aafe5429, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &5767751339082063307 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3177185491562410701} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Button + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 2528055724837407497} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &4535838851163113075 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3177185491562410701} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3} + m_Name: + m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.EventSystems.EventTrigger + m_Delegates: [] +--- !u!114 &3505625079546582005 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3177185491562410701} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: be718fab39448a644b228469875f0689, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::Northbound.BuildingSlotButton + iconImage: {fileID: 1268587308832695165} + nameText: {fileID: 3777750717565537039} + hotkeyText: {fileID: 7255687967647854611} + backgroundImage: {fileID: 2528055724837407497} + button: {fileID: 5767751339082063307} + normalColor: {r: 0.2, g: 0.2, b: 0.2, a: 0.8} + selectedColor: {r: 0.3, g: 0.6, b: 0.3, a: 1} + hoverColor: {r: 0.3, g: 0.3, b: 0.3, a: 1} +--- !u!114 &288246739155426764 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3177185491562410701} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} + m_Name: + m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 80 + m_PreferredHeight: 80 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &3503358795193852945 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8859221909843448331} + - component: {fileID: 5277120818714561014} + - component: {fileID: 3777750717565537039} + m_Layer: 5 + m_Name: NameText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8859221909843448331 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3503358795193852945} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6557039598812214310} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 5} + m_SizeDelta: {x: 0, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5277120818714561014 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3503358795193852945} + m_CullTransparentMesh: 1 +--- !u!114 &3777750717565537039 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3503358795193852945} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Wall + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 52310d2f5a2eaaf49bdaf92c08c5eb78, type: 2} + m_sharedMaterial: {fileID: 3669596862895025436, guid: 52310d2f5a2eaaf49bdaf92c08c5eb78, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 12 + m_fontSizeBase: 12 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_characterHorizontalScale: 1 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &5510288563591337089 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9129141957646790745} + - component: {fileID: 1009756672107567946} + - component: {fileID: 1268587308832695165} + m_Layer: 5 + m_Name: Icon + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &9129141957646790745 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5510288563591337089} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6557039598812214310} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 60, y: 60} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &1009756672107567946 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5510288563591337089} + m_CullTransparentMesh: 1 +--- !u!114 &1268587308832695165 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5510288563591337089} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 diff --git a/Assets/Prefabs/BuildingSlotButton.prefab.meta b/Assets/Prefabs/BuildingSlotButton.prefab.meta new file mode 100644 index 0000000..677e619 --- /dev/null +++ b/Assets/Prefabs/BuildingSlotButton.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d2319e04c5a7d0545a6a351abae7a9c2 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/GameMain.unity b/Assets/Scenes/GameMain.unity index 17712ee..8d83353 100644 --- a/Assets/Scenes/GameMain.unity +++ b/Assets/Scenes/GameMain.unity @@ -152,6 +152,143 @@ Transform: - {fileID: 1672828973} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &245729787 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 245729788} + - component: {fileID: 245729790} + - component: {fileID: 245729789} + m_Layer: 5 + m_Name: NameText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &245729788 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 245729787} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1285448381} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 5} + m_SizeDelta: {x: 0, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &245729789 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 245729787} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: New Text + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 36 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_characterHorizontalScale: 1 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &245729790 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 245729787} + m_CullTransparentMesh: 1 --- !u!1 &306979656 GameObject: m_ObjectHideFlags: 0 @@ -375,79 +512,6 @@ Transform: m_CorrespondingSourceObject: {fileID: 2561889291515577528, guid: 04e95700704d92248b63ce5674bd9638, type: 3} m_PrefabInstance: {fileID: 324420007} m_PrefabAsset: {fileID: 0} ---- !u!1001 &411374357 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 8940572951313384067} - m_Modifications: - - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3} - propertyPath: m_LocalScale.x - value: 5 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3} - propertyPath: m_LocalScale.y - value: 5 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3} - propertyPath: m_LocalScale.z - value: 5 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3} - propertyPath: m_LocalRotation.x - value: 0.00000008146034 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -7511558181221131132, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3} - propertyPath: 'm_Materials.Array.data[0]' - value: - objectReference: {fileID: 2100000, guid: 91e05bbf1e5cbfb4d865c8e2febc4673, type: 2} - - target: {fileID: 919132149155446097, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3} - propertyPath: m_Name - value: building_castle_blue - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3} --- !u!1 &447015514 GameObject: m_ObjectHideFlags: 0 @@ -604,6 +668,7 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1053830688} + - {fileID: 768754085} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} @@ -930,11 +995,82 @@ Transform: m_CorrespondingSourceObject: {fileID: 2561889291515577528, guid: 04e95700704d92248b63ce5674bd9638, type: 3} m_PrefabInstance: {fileID: 635112512} m_PrefabAsset: {fileID: 0} ---- !u!4 &702452987 stripped -Transform: - m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 0402c4b1e07c04444b61bea1d63d7880, type: 3} - m_PrefabInstance: {fileID: 411374357} +--- !u!1 &768754084 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 768754085} + - component: {fileID: 768754087} + - component: {fileID: 768754086} + m_Layer: 5 + m_Name: QuickslotPanel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &768754085 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 768754084} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1859567750} + m_Father: {fileID: 457600247} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 50} + m_SizeDelta: {x: 800, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &768754086 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 768754084} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.392} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &768754087 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 768754084} + m_CullTransparentMesh: 1 --- !u!1 &782070680 GameObject: m_ObjectHideFlags: 0 @@ -1062,6 +1198,218 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &794230683 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 794230684} + - component: {fileID: 794230686} + - component: {fileID: 794230685} + m_Layer: 5 + m_Name: HotkeyText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &794230684 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 794230683} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1285448381} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 5, y: -5} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &794230685 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 794230683} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: New Text + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4278255615 + m_fontColor: {r: 1, g: 1, b: 0, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 14 + m_fontSizeBase: 14 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_characterHorizontalScale: 1 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &794230686 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 794230683} + m_CullTransparentMesh: 1 +--- !u!1 &824068912 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 824068913} + - component: {fileID: 824068915} + - component: {fileID: 824068914} + m_Layer: 5 + m_Name: Icon + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &824068913 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 824068912} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1285448381} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 10} + m_SizeDelta: {x: 60, y: 60} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &824068914 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 824068912} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &824068915 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 824068912} + m_CullTransparentMesh: 1 --- !u!1 &908127335 GameObject: m_ObjectHideFlags: 0 @@ -1379,6 +1727,32 @@ MonoBehaviour: m_MinRegionArea: 2 m_NavMeshData: {fileID: 23800000, guid: a847cf63b54abee4cbd5b6c92c8ad5e6, type: 2} m_BuildHeightMesh: 0 +--- !u!1 &1049568313 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 5585059388146411250, guid: f395fcc064a3a834ba957327f1387c19, type: 3} + m_PrefabInstance: {fileID: 4875211098963642791} + m_PrefabAsset: {fileID: 0} +--- !u!65 &1049568317 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1049568313} + 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: 3 + m_Size: {x: 4, y: 5, z: 4} + m_Center: {x: 0, y: 0, z: 0} --- !u!1 &1053830687 GameObject: m_ObjectHideFlags: 0 @@ -1692,6 +2066,267 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1285448380 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1285448381} + - component: {fileID: 1285448384} + - component: {fileID: 1285448383} + - component: {fileID: 1285448382} + m_Layer: 5 + m_Name: Button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1285448381 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1285448380} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1412232582} + - {fileID: 824068913} + - {fileID: 245729788} + - {fileID: 794230684} + m_Father: {fileID: 1859567750} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1285448382 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1285448380} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Button + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1285448383} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &1285448383 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1285448380} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1285448384 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1285448380} + m_CullTransparentMesh: 1 +--- !u!1 &1412232581 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1412232582} + - component: {fileID: 1412232584} + - component: {fileID: 1412232583} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1412232582 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1412232581} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1285448381} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1412232583 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1412232581} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Button + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 24 + m_fontSizeBase: 24 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_characterHorizontalScale: 1 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &1412232584 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1412232581} + m_CullTransparentMesh: 1 --- !u!1 &1433142230 GameObject: m_ObjectHideFlags: 0 @@ -2167,6 +2802,69 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1859567749 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1859567750} + - component: {fileID: 1859567751} + m_Layer: 5 + m_Name: SlotContainer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1859567750 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1859567749} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1285448381} + m_Father: {fileID: 768754085} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -20, y: -20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1859567751 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1859567749} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} + m_Name: + m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.HorizontalLayoutGroup + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 4 + m_Spacing: 10 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 0 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 --- !u!1001 &1975225896 PrefabInstance: m_ObjectHideFlags: 0 @@ -2268,7 +2966,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 320439620877427584, guid: d20c3ce6a3c39154aa033d0f61bd9a4d, type: 3} propertyPath: m_LocalPosition.z - value: 0 + value: -75.71 objectReference: {fileID: 0} - target: {fileID: 320439620877427584, guid: d20c3ce6a3c39154aa033d0f61bd9a4d, type: 3} propertyPath: m_LocalRotation.w @@ -2302,14 +3000,6 @@ PrefabInstance: propertyPath: m_Name value: BuildingFoundation objectReference: {fileID: 0} - - target: {fileID: 1340458267086560577, guid: d20c3ce6a3c39154aa033d0f61bd9a4d, type: 3} - propertyPath: m_Layer - value: 7 - objectReference: {fileID: 0} - - target: {fileID: 2851644658348875061, guid: d20c3ce6a3c39154aa033d0f61bd9a4d, type: 3} - propertyPath: m_Layer - value: 7 - objectReference: {fileID: 0} - target: {fileID: 7934051929434515110, guid: d20c3ce6a3c39154aa033d0f61bd9a4d, type: 3} propertyPath: GlobalObjectIdHash value: 1879467101 @@ -2527,10 +3217,10 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - - target: {fileID: 993863006843805547, guid: e56926eda34629f4fbf3e4c53f0f8bd4, type: 3} - propertyPath: 'm_Materials.Array.data[0]' + - target: {fileID: 1287070985890992582, guid: e56926eda34629f4fbf3e4c53f0f8bd4, type: 3} + propertyPath: interactionAnimationTrigger value: - objectReference: {fileID: 2100000, guid: d64c307f1b4197c44970c29f9845c245, type: 2} + objectReference: {fileID: 0} - target: {fileID: 5173262576415873253, guid: e56926eda34629f4fbf3e4c53f0f8bd4, type: 3} propertyPath: GlobalObjectIdHash value: 3998537868 @@ -2579,18 +3269,10 @@ PrefabInstance: propertyPath: m_Name value: Core objectReference: {fileID: 0} - m_RemovedComponents: - - {fileID: 5613501924847776270, guid: e56926eda34629f4fbf3e4c53f0f8bd4, type: 3} - m_RemovedGameObjects: - - {fileID: 1642148463057321662, guid: e56926eda34629f4fbf3e4c53f0f8bd4, type: 3} - m_AddedGameObjects: - - targetCorrespondingSourceObject: {fileID: 8064559726283331702, guid: e56926eda34629f4fbf3e4c53f0f8bd4, type: 3} - insertIndex: -1 - addedObject: {fileID: 702452987} - m_AddedComponents: - - targetCorrespondingSourceObject: {fileID: 8124290768227340041, guid: e56926eda34629f4fbf3e4c53f0f8bd4, type: 3} - insertIndex: -1 - addedObject: {fileID: 8940572951313384070} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: e56926eda34629f4fbf3e4c53f0f8bd4, type: 3} --- !u!1001 &4875211098963642791 PrefabInstance: @@ -2648,10 +3330,14 @@ PrefabInstance: propertyPath: m_Name value: Mine objectReference: {fileID: 0} - m_RemovedComponents: [] + m_RemovedComponents: + - {fileID: 2263651141701971438, guid: f395fcc064a3a834ba957327f1387c19, type: 3} m_RemovedGameObjects: [] m_AddedGameObjects: [] - m_AddedComponents: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 5585059388146411250, guid: f395fcc064a3a834ba957327f1387c19, type: 3} + insertIndex: -1 + addedObject: {fileID: 1049568317} m_SourcePrefab: {fileID: 100100000, guid: f395fcc064a3a834ba957327f1387c19, type: 3} --- !u!1001 &6880333684802239182 PrefabInstance: @@ -2738,6 +3424,10 @@ PrefabInstance: propertyPath: 'm_Materials.Array.data[0]' value: objectReference: {fileID: 2100000, guid: 726c1e9087356f74594664341c681f12, type: 2} + - target: {fileID: 6318029566152463913, guid: 8c45964a69bf8fa4ba461ed217bc052f, type: 3} + propertyPath: interactionAnimationTrigger + value: + objectReference: {fileID: 0} - target: {fileID: 8174164215098746841, guid: 8c45964a69bf8fa4ba461ed217bc052f, type: 3} propertyPath: m_LocalPosition.x value: -16.30842 @@ -2748,7 +3438,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 8174164215098746841, guid: 8c45964a69bf8fa4ba461ed217bc052f, type: 3} propertyPath: m_LocalPosition.z - value: -83.46 + value: -76.76 objectReference: {fileID: 0} - target: {fileID: 8174164215098746841, guid: 8c45964a69bf8fa4ba461ed217bc052f, type: 3} propertyPath: m_LocalRotation.w @@ -2783,48 +3473,17 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 8c45964a69bf8fa4ba461ed217bc052f, type: 3} ---- !u!1 &8940572951313384064 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 8124290768227340041, guid: e56926eda34629f4fbf3e4c53f0f8bd4, type: 3} - m_PrefabInstance: {fileID: 4786254629656932894} - m_PrefabAsset: {fileID: 0} --- !u!114 &8940572951313384066 stripped MonoBehaviour: m_CorrespondingSourceObject: {fileID: 1287070985890992582, guid: e56926eda34629f4fbf3e4c53f0f8bd4, type: 3} m_PrefabInstance: {fileID: 4786254629656932894} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8940572951313384064} + m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 7c94274e2af2c8d4f827fe52b26c4410, type: 3} m_Name: m_EditorClassIdentifier: Assembly-CSharp::Northbound.Core ---- !u!4 &8940572951313384067 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 8064559726283331702, guid: e56926eda34629f4fbf3e4c53f0f8bd4, type: 3} - m_PrefabInstance: {fileID: 4786254629656932894} - m_PrefabAsset: {fileID: 0} ---- !u!65 &8940572951313384070 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8940572951313384064} - 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: 3 - m_Size: {x: 10, y: 10, z: 10} - m_Center: {x: 0, y: 5, z: 0} --- !u!1660057539 &9223372036854775807 SceneRoots: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/BuildingData.cs b/Assets/Scripts/BuildingData.cs index 3dde479..22fd45c 100644 --- a/Assets/Scripts/BuildingData.cs +++ b/Assets/Scripts/BuildingData.cs @@ -8,6 +8,8 @@ namespace Northbound [Header("Building Info")] public string buildingName; public GameObject prefab; + [Tooltip("UI에 표시될 건물 아이콘")] + public Sprite icon; [Header("Grid Size")] [Tooltip("Width in grid units")] diff --git a/Assets/Scripts/BuildingFoundation.cs b/Assets/Scripts/BuildingFoundation.cs index 5ea1d0b..afda2e1 100644 --- a/Assets/Scripts/BuildingFoundation.cs +++ b/Assets/Scripts/BuildingFoundation.cs @@ -133,13 +133,6 @@ namespace Northbound return false; } - // 쿨다운 체크 - if (Time.time - _lastInteractionTime < buildingData.interactionCooldown) - { - Debug.Log($"[BuildingFoundation] Cooldown active: {Time.time - _lastInteractionTime}/{buildingData.interactionCooldown}"); - return false; - } - // 이미 완성됨 if (_currentProgress.Value >= buildingData.requiredWorkAmount) { @@ -155,7 +148,6 @@ namespace Northbound return false; } - Debug.Log($"[BuildingFoundation] CanInteract = true"); return true; } diff --git a/Assets/Scripts/BuildingManager.cs b/Assets/Scripts/BuildingManager.cs index d243967..d2f37fc 100644 --- a/Assets/Scripts/BuildingManager.cs +++ b/Assets/Scripts/BuildingManager.cs @@ -120,11 +120,6 @@ namespace Northbound // 충돌한 Collider가 있으면 배치 불가 if (colliders.Length > 0) { - Debug.Log($"[BuildingManager] 물리적 충돌 감지: {colliders.Length}개의 오브젝트와 겹침"); - foreach (var col in colliders) - { - Debug.Log($" - {col.gameObject.name} (Layer: {LayerMask.LayerToName(col.gameObject.layer)})"); - } return false; } diff --git a/Assets/Scripts/BuildingPlacement.cs b/Assets/Scripts/BuildingPlacement.cs index 46d8c18..0b586b3 100644 --- a/Assets/Scripts/BuildingPlacement.cs +++ b/Assets/Scripts/BuildingPlacement.cs @@ -1,6 +1,7 @@ using Unity.Netcode; using UnityEngine; using UnityEngine.InputSystem; +using UnityEngine.EventSystems; namespace Northbound { @@ -124,12 +125,51 @@ namespace Northbound if (isBuildModeActive) { + // UI 표시 + if (BuildingQuickslotUI.Instance != null) + { + BuildingQuickslotUI.Instance.ShowQuickslot(this); + } + CreatePreview(); } else { + // UI 숨김 + if (BuildingQuickslotUI.Instance != null) + { + BuildingQuickslotUI.Instance.HideQuickslot(); + } + DestroyPreview(); } + + Debug.Log($"[BuildingPlacement] 건설 모드 {(isBuildModeActive ? "활성화" : "비활성화")}"); + } + + /// + /// UI에서 건물 선택 시 호출 + /// + public void SetSelectedBuilding(int index) + { + if (index < 0 || BuildingManager.Instance == null || + index >= BuildingManager.Instance.availableBuildings.Count) + { + Debug.LogWarning($"[BuildingPlacement] 유효하지 않은 건물 인덱스: {index}"); + return; + } + + selectedBuildingIndex = index; + currentRotation = 0; // 회전 초기화 + + // 프리뷰 다시 생성 + if (isBuildModeActive) + { + DestroyPreview(); + CreatePreview(); + } + + Debug.Log($"[BuildingPlacement] 건물 선택됨: {BuildingManager.Instance.availableBuildings[index].buildingName}"); } private void CreatePreview() @@ -187,6 +227,8 @@ namespace Northbound { collider.enabled = false; } + + Debug.Log($"[BuildingPlacement] 프리뷰 생성됨: {data.buildingName}"); } private void DestroyPreview() @@ -241,6 +283,13 @@ namespace Northbound { if (!isBuildModeActive || previewObject == null) return; + // UI 위에서 클릭한 경우 무시 + if (IsPointerOverUI()) + { + Debug.Log("[BuildingPlacement] UI 위에서 클릭함 - 건설 취소"); + return; + } + // Get placement position Ray ray = Camera.main.ScreenPointToRay(Mouse.current.position.ReadValue()); if (Physics.Raycast(ray, out RaycastHit hit, maxPlacementDistance, groundLayer)) @@ -249,34 +298,43 @@ namespace Northbound if (BuildingManager.Instance.IsValidPlacement(selectedData, hit.point, currentRotation, out Vector3 groundPosition)) { - // 토대 배치 요청 (실제로는 토대가 생성됨) + // 토대 배치 요청 BuildingManager.Instance.RequestPlaceFoundation(selectedBuildingIndex, groundPosition, currentRotation); - - Debug.Log($"[BuildingPlacement] 토대 배치 요청: {selectedData.buildingName}"); + Debug.Log($"[BuildingPlacement] 건설 시작: {selectedData.buildingName}"); } else { - Debug.LogWarning("[BuildingPlacement] 배치할 수 없는 위치입니다."); + Debug.Log("[BuildingPlacement] 배치할 수 없는 위치입니다."); } } } - private void OnDrawGizmos() + /// + /// 마우스 포인터가 UI 위에 있는지 확인 + /// + private bool IsPointerOverUI() { - if (!IsOwner || !isBuildModeActive || !showGridBounds) return; - if (BuildingManager.Instance == null || previewObject == null || !previewObject.activeSelf) return; + // EventSystem이 없으면 UI 체크 불가능 + if (EventSystem.current == null) + return false; - BuildingData data = BuildingManager.Instance.availableBuildings[selectedBuildingIndex]; - if (data == null) return; + // New Input System을 사용하는 경우 + if (Mouse.current != null) + { + Vector2 mousePosition = Mouse.current.position.ReadValue(); + return EventSystem.current.IsPointerOverGameObject(); + } - // Draw grid bounds being used for collision detection - Bounds bounds = BuildingManager.Instance.GetPlacementBounds(data, previewObject.transform.position, currentRotation); + // Legacy Input System (폴백) + return EventSystem.current.IsPointerOverGameObject(); + } - // Check if valid - bool isValid = BuildingManager.Instance.IsValidPlacement(data, previewObject.transform.position, currentRotation, out _); - - Gizmos.color = isValid ? new Color(0, 1, 0, 0.5f) : new Color(1, 0, 0, 0.5f); - Gizmos.DrawWireCube(bounds.center, bounds.size); + /// + /// 건설 모드 활성화 상태 확인 + /// + public bool IsBuildModeActive() + { + return isBuildModeActive; } } } diff --git a/Assets/Scripts/BuildingQuickslotUI.cs b/Assets/Scripts/BuildingQuickslotUI.cs new file mode 100644 index 0000000..4bdfd0d --- /dev/null +++ b/Assets/Scripts/BuildingQuickslotUI.cs @@ -0,0 +1,302 @@ +using System.Collections.Generic; +using Unity.Netcode; +using UnityEngine; +using UnityEngine.InputSystem; +using TMPro; + +namespace Northbound +{ + /// + /// 건설 모드 시 건축 가능한 건물들을 표시하는 퀵슬롯 UI + /// + public class BuildingQuickslotUI : MonoBehaviour + { + public static BuildingQuickslotUI Instance { get; private set; } + + [Header("UI References")] + [SerializeField] private GameObject quickslotPanel; + [SerializeField] private Transform slotContainer; + [SerializeField] private GameObject slotButtonPrefab; + + [Header("Settings")] + [SerializeField] private int maxSlots = 8; + + private List slotButtons = new List(); + private BuildingPlacement buildingPlacement; + private int currentSelectedIndex = -1; + private PlayerInputActions _inputActions; + private InputAction[] _quickslotActions; + + private void Awake() + { + if (Instance != null && Instance != this) + { + Destroy(gameObject); + return; + } + Instance = this; + + // Input Actions 초기화 + _inputActions = new PlayerInputActions(); + InitializeQuickslotActions(); + } + + private void OnEnable() + { + EnableQuickslotActions(false); // 초기에는 비활성화 + } + + private void OnDisable() + { + DisableQuickslotActions(); + } + + private void OnDestroy() + { + UnsubscribeQuickslotActions(); + _inputActions?.Dispose(); + } + + private void Start() + { + if (quickslotPanel != null) + { + quickslotPanel.SetActive(false); + } + + InitializeSlots(); + } + + /// + /// 퀵슬롯 Input Actions 초기화 및 구독 (직접 참조) + /// + private void InitializeQuickslotActions() + { + _quickslotActions = new InputAction[maxSlots]; + + // 수동으로 각 액션 할당 + // Input Actions 에셋에 QuickSlot1~8 액션을 추가했는지 확인하세요 + _quickslotActions[0] = _inputActions.Player.QuickSlot1; + _quickslotActions[1] = _inputActions.Player.QuickSlot2; + _quickslotActions[2] = _inputActions.Player.QuickSlot3; + _quickslotActions[3] = _inputActions.Player.QuickSlot4; + _quickslotActions[4] = _inputActions.Player.QuickSlot5; + _quickslotActions[5] = _inputActions.Player.QuickSlot6; + _quickslotActions[6] = _inputActions.Player.QuickSlot7; + _quickslotActions[7] = _inputActions.Player.QuickSlot8; + + // 이벤트 구독 + for (int i = 0; i < _quickslotActions.Length; i++) + { + if (_quickslotActions[i] != null) + { + int slotIndex = i; // 클로저 캡처를 위한 로컬 변수 + _quickslotActions[i].performed += ctx => OnQuickslotPressed(slotIndex); + Debug.Log($"[BuildingQuickslotUI] QuickSlot{i + 1} 액션 바인딩 성공"); + } + else + { + Debug.LogWarning($"[BuildingQuickslotUI] QuickSlot{i + 1} 액션이 null입니다. Input Actions 에셋을 확인하세요."); + } + } + } + + /// + /// 퀵슬롯 액션 구독 해제 + /// + private void UnsubscribeQuickslotActions() + { + if (_quickslotActions == null) return; + + for (int i = 0; i < _quickslotActions.Length; i++) + { + if (_quickslotActions[i] != null) + { + int slotIndex = i; + _quickslotActions[i].performed -= ctx => OnQuickslotPressed(slotIndex); + } + } + } + + /// + /// 퀵슬롯 액션 활성화 + /// + private void EnableQuickslotActions(bool enable) + { + if (_quickslotActions == null) return; + + foreach (var action in _quickslotActions) + { + if (action != null) + { + if (enable) + action.Enable(); + else + action.Disable(); + } + } + } + + /// + /// 퀵슬롯 액션 비활성화 + /// + private void DisableQuickslotActions() + { + EnableQuickslotActions(false); + } + + /// + /// 퀵슬롯 키 입력 처리 + /// + private void OnQuickslotPressed(int slotIndex) + { + // 퀵슬롯이 활성화되어 있고, 유효한 인덱스인 경우만 처리 + if (quickslotPanel != null && quickslotPanel.activeSelf && slotIndex < slotButtons.Count) + { + SelectBuilding(slotIndex); + } + } + + /// + /// BuildingManager의 건물 목록으로 슬롯 초기화 + /// + private void InitializeSlots() + { + if (BuildingManager.Instance == null || slotContainer == null || slotButtonPrefab == null) + { + Debug.LogWarning("[BuildingQuickslotUI] 필수 컴포넌트가 설정되지 않았습니다."); + return; + } + + // 기존 슬롯 제거 + foreach (var slot in slotButtons) + { + if (slot != null) + Destroy(slot.gameObject); + } + slotButtons.Clear(); + + // 건물 목록으로 슬롯 생성 (최대 maxSlots개) + var buildings = BuildingManager.Instance.availableBuildings; + int slotCount = Mathf.Min(buildings.Count, maxSlots); + + for (int i = 0; i < slotCount; i++) + { + CreateSlot(buildings[i], i); + } + + Debug.Log($"[BuildingQuickslotUI] {slotButtons.Count}개의 건물 슬롯 생성됨"); + } + + /// + /// 개별 슬롯 버튼 생성 + /// + private void CreateSlot(BuildingData buildingData, int index) + { + GameObject slotObj = Instantiate(slotButtonPrefab, slotContainer); + BuildingSlotButton slotButton = slotObj.GetComponent(); + + if (slotButton != null) + { + slotButton.Initialize(buildingData, index, this); + slotButtons.Add(slotButton); + + // 핫키 표시 (1-8) + slotButton.SetHotkeyText((index + 1).ToString()); + } + } + + /// + /// 건설 모드 활성화 (BuildingPlacement에서 호출) + /// + public void ShowQuickslot(BuildingPlacement placement) + { + buildingPlacement = placement; + + if (quickslotPanel != null) + { + quickslotPanel.SetActive(true); + } + + // 퀵슬롯 입력 활성화 + EnableQuickslotActions(true); + + // 기본 선택 (첫 번째 건물) + if (slotButtons.Count > 0) + { + SelectBuilding(0); + } + + Debug.Log("[BuildingQuickslotUI] 건설 퀵슬롯 표시됨"); + } + + /// + /// 건설 모드 비활성화 + /// + public void HideQuickslot() + { + if (quickslotPanel != null) + { + quickslotPanel.SetActive(false); + } + + // 퀵슬롯 입력 비활성화 + DisableQuickslotActions(); + + buildingPlacement = null; + currentSelectedIndex = -1; + + // 모든 슬롯 선택 해제 + foreach (var slot in slotButtons) + { + if (slot != null) + slot.SetSelected(false); + } + + Debug.Log("[BuildingQuickslotUI] 건설 퀵슬롯 숨김"); + } + + /// + /// 건물 선택 (슬롯 버튼 클릭 또는 핫키) + /// + public void SelectBuilding(int index) + { + if (index < 0 || index >= slotButtons.Count) + return; + + // 이전 선택 해제 + if (currentSelectedIndex >= 0 && currentSelectedIndex < slotButtons.Count) + { + slotButtons[currentSelectedIndex].SetSelected(false); + } + + // 새로운 선택 + currentSelectedIndex = index; + slotButtons[index].SetSelected(true); + + // BuildingPlacement에 알림 + if (buildingPlacement != null) + { + buildingPlacement.SetSelectedBuilding(index); + } + + Debug.Log($"[BuildingQuickslotUI] 건물 선택됨: {slotButtons[index].GetBuildingName()} (인덱스: {index})"); + } + + /// + /// 현재 선택된 건물 인덱스 + /// + public int GetSelectedIndex() + { + return currentSelectedIndex; + } + + /// + /// 슬롯 개수 반환 + /// + public int GetSlotCount() + { + return slotButtons.Count; + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/BuildingQuickslotUI.cs.meta b/Assets/Scripts/BuildingQuickslotUI.cs.meta new file mode 100644 index 0000000..6c8ebc9 --- /dev/null +++ b/Assets/Scripts/BuildingQuickslotUI.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: ea63e719aed95e349b7f8dd7ec1d00b2 \ No newline at end of file diff --git a/Assets/Scripts/BuildingSlotButton.cs b/Assets/Scripts/BuildingSlotButton.cs new file mode 100644 index 0000000..e5d57e0 --- /dev/null +++ b/Assets/Scripts/BuildingSlotButton.cs @@ -0,0 +1,154 @@ +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.EventSystems; +using TMPro; + +namespace Northbound +{ + /// + /// 개별 건물 슬롯 버튼 + /// + [RequireComponent(typeof(EventTrigger))] + public class BuildingSlotButton : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler + { + [Header("UI References")] + [SerializeField] private Image iconImage; + [SerializeField] private TextMeshProUGUI nameText; + [SerializeField] private TextMeshProUGUI hotkeyText; + [SerializeField] private Image backgroundImage; + [SerializeField] private Button button; + + [Header("Visual Settings")] + [SerializeField] private Color normalColor = new Color(0.2f, 0.2f, 0.2f, 0.8f); + [SerializeField] private Color selectedColor = new Color(0.3f, 0.6f, 0.3f, 1f); + [SerializeField] private Color hoverColor = new Color(0.3f, 0.3f, 0.3f, 1f); + + private BuildingData buildingData; + private int slotIndex; + private BuildingQuickslotUI quickslotUI; + private bool isSelected = false; + + private void Awake() + { + if (button == null) + button = GetComponent