diff --git a/Assets/01.Scenes/01.Tycoon.unity b/Assets/01.Scenes/01.Tycoon.unity index 27aa66f0a..40352d76b 100644 --- a/Assets/01.Scenes/01.Tycoon.unity +++ b/Assets/01.Scenes/01.Tycoon.unity @@ -237,6 +237,182 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 1f1852e60e7132046b79863fb1d23af0, type: 3} +--- !u!1 &114124395 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 114124396} + - component: {fileID: 114124398} + - component: {fileID: 114124397} + m_Layer: 5 + m_Name: FadeImage + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &114124396 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 114124395} + 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: 1049919592} + 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 &114124397 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 114124395} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0} + m_RaycastTarget: 0 + 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 &114124398 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 114124395} + m_CullTransparentMesh: 0 +--- !u!1 &119395937 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 119395941} + - component: {fileID: 119395940} + - component: {fileID: 119395939} + - component: {fileID: 119395938} + m_Layer: 5 + m_Name: WorldSpaceCanvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &119395938 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 119395937} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 16383 +--- !u!114 &119395939 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 119395937} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 1 +--- !u!223 &119395940 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 119395937} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 2 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_VertexColorAlwaysGammaSpace: 1 + m_AdditionalShaderChannelsFlag: 0 + m_UpdateRectTransformForStandalone: 0 + m_SortingLayerID: -1197429611 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &119395941 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 119395937} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 960, y: 540} + m_SizeDelta: {x: 1920, y: 1080} + m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &166220739 GameObject: m_ObjectHideFlags: 0 @@ -546,6 +722,251 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &211259724 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 211259727} + - component: {fileID: 211259726} + - component: {fileID: 211259725} + - component: {fileID: 211259728} + - component: {fileID: 211259730} + - component: {fileID: 211259732} + - component: {fileID: 211259729} + - component: {fileID: 211259731} + m_Layer: 9 + m_Name: TycoonPlayer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!136 &211259725 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 211259724} + 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: 2 + m_Radius: 0.25 + m_Height: 1 + m_Direction: 1 + m_Center: {x: 0, y: 0.5, z: 0} +--- !u!54 &211259726 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 211259724} + serializedVersion: 4 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_CenterOfMass: {x: 0, y: 0, z: 0} + m_InertiaTensor: {x: 1, y: 1, z: 1} + m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ImplicitCom: 1 + m_ImplicitTensor: 1 + m_UseGravity: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 112 + m_CollisionDetection: 0 +--- !u!4 &211259727 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 211259724} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 2, y: 2, z: 2} + m_ConstrainProportionsScale: 1 + m_Children: + - {fileID: 988649516} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &211259728 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 211259724} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 62899f850307741f2a39c98a8b639597, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Actions: {fileID: -944628639613478452, guid: 4ed6540e2f7ce234888adf8deff1f241, type: 3} + m_NotificationBehavior: 2 + m_UIInputModule: {fileID: 0} + m_DeviceLostEvent: + m_PersistentCalls: + m_Calls: [] + m_DeviceRegainedEvent: + m_PersistentCalls: + m_Calls: [] + m_ControlsChangedEvent: + m_PersistentCalls: + m_Calls: [] + m_ActionEvents: + - m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 211259729} + m_TargetAssemblyTypeName: BlueWater.Players.Tycoons.TycoonInput, Assembly-CSharp + m_MethodName: OnMove + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_ActionId: 52dbe09f-4e34-4a14-a772-54f5d5d97787 + m_ActionName: 'Tycoon/Move[/Keyboard/w,/Keyboard/s,/Keyboard/a,/Keyboard/d]' + - m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 211259729} + m_TargetAssemblyTypeName: BlueWater.Players.Tycoons.TycoonInput, Assembly-CSharp + m_MethodName: OnInteraction + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_ActionId: 31e27536-38f7-4c48-ad94-663c23a8c2a8 + m_ActionName: 'Tycoon/Interaction[/Keyboard/e]' + - m_PersistentCalls: + m_Calls: [] + m_ActionId: 58dbe258-7d9d-4d57-a59d-9165662f3d4b + m_ActionName: 'Combat/Move[/Keyboard/w,/Keyboard/s,/Keyboard/a,/Keyboard/d]' + - m_PersistentCalls: + m_Calls: [] + m_ActionId: 472e0ca2-cdfb-496f-bf8c-c25a4b0a6c8b + m_ActionName: 'Combat/Attack[/Mouse/leftButton,/Keyboard/k]' + - m_PersistentCalls: + m_Calls: [] + m_ActionId: aaf44bb4-bce6-4abe-bb2a-ec5f15b43c8f + m_ActionName: 'Combat/Dash[/Keyboard/space]' + - m_PersistentCalls: + m_Calls: [] + m_ActionId: ebdb638c-8057-4b32-8cb5-b4e5039b4969 + m_ActionName: 'Combat/ActivateMainSkill[/Mouse/rightButton]' + - m_PersistentCalls: + m_Calls: [] + m_ActionId: d7467711-57a8-4a31-a2ba-d14040cff3e7 + m_ActionName: 'Combat/OpenMenu[/Keyboard/escape]' + - m_PersistentCalls: + m_Calls: [] + m_ActionId: 65cfde9b-38e6-4d35-b2a6-f48dbbeeead6 + m_ActionName: 'Combat/OpenItemInventory[/Keyboard/i]' + - m_PersistentCalls: + m_Calls: [] + m_ActionId: 494568c8-7762-428e-8e8c-1920adfcc29a + m_ActionName: 'CombatUi/Cancel[/Keyboard/escape]' + - m_PersistentCalls: + m_Calls: [] + m_ActionId: 5df8fd65-01b8-4cfe-b110-5ff2cfdd437f + m_ActionName: 'CombatUi/InteractionUi[/Keyboard/e]' + - m_PersistentCalls: + m_Calls: [] + m_ActionId: 04886026-3576-4662-8c73-dab606c598ed + m_ActionName: 'CombatUi/CloseItemInventory[/Keyboard/i]' + m_NeverAutoSwitchControlSchemes: 0 + m_DefaultControlScheme: + m_DefaultActionMap: Tycoon + m_SplitScreenIndex: -1 + m_Camera: {fileID: 0} +--- !u!114 &211259729 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 211259724} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2bc02c60fe9bf724885e9f5713f900ee, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &211259730 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 211259724} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe62039701799b0468ff96958a2912a6, type: 3} + m_Name: + m_EditorClassIdentifier: + k__BackingField: {fileID: 211259726} + k__BackingField: {fileID: 211259725} + k__BackingField: {fileID: 211259728} + k__BackingField: {fileID: 988649516} + k__BackingField: {fileID: 988649517} + k__BackingField: {fileID: 211259732} + k__BackingField: {fileID: 211259729} + k__BackingField: {fileID: 211259731} +--- !u!114 &211259731 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 211259724} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: cb167e66df896c745a538310e5a52f61, type: 3} + m_Name: + m_EditorClassIdentifier: + k__BackingField: 7 +--- !u!114 &211259732 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 211259724} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8130801e9ac84aa0874ac36c80383d9c, type: 3} + m_Name: + m_EditorClassIdentifier: + _initialSkinName: 01 --- !u!1 &355668242 GameObject: m_ObjectHideFlags: 0 @@ -595,6 +1016,38 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &461791771 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 461791772} + m_Layer: 0 + m_Name: Grounds + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &461791772 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 461791771} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1178042445} + m_Father: {fileID: 1253205195} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &545850347 GameObject: m_ObjectHideFlags: 0 @@ -624,7 +1077,7 @@ Transform: m_GameObject: {fileID: 545850347} serializedVersion: 2 m_LocalRotation: {x: 0.17364816, y: 0, z: 0, w: 0.9848078} - m_LocalPosition: {x: 0, y: 10.260604, z: -33.19078} + m_LocalPosition: {x: 0, y: 10.260604, z: -28.190779} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -757,7 +1210,7 @@ MonoBehaviour: m_StreamingVersion: 20230301 m_LegacyPriority: 0 Target: - TrackingTarget: {fileID: 0} + TrackingTarget: {fileID: 211259727} LookAtTarget: {fileID: 0} CustomLookAtTarget: 1 Lens: @@ -825,6 +1278,7 @@ GameObject: - component: {fileID: 873223989} - component: {fileID: 873223988} - component: {fileID: 873223987} + - component: {fileID: 873223993} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -984,12 +1438,28 @@ Transform: m_GameObject: {fileID: 873223985} serializedVersion: 2 m_LocalRotation: {x: 0.17364816, y: 0, z: 0, w: 0.9848078} - m_LocalPosition: {x: 0, y: 10.260604, z: -33.19078} + m_LocalPosition: {x: 0, y: 10.260604, z: -28.190779} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 9.569, y: 87.98, z: 0} +--- !u!114 &873223993 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 873223985} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a856a42a0bf4a7444a3efb5466fc1d4c, type: 3} + m_Name: + m_EditorClassIdentifier: + _persistent: 0 + _cinemachineCameras: {fileID: 1634548838} + k__BackingField: {fileID: 545850352} + MainCamera: {fileID: 873223991} --- !u!1001 &874559119 PrefabInstance: m_ObjectHideFlags: 0 @@ -1047,6 +1517,347 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 15c02fef22ba8d0488bd2517167c117c, type: 3} +--- !u!1 &988649515 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 988649516} + - component: {fileID: 988649519} + - component: {fileID: 988649518} + - component: {fileID: 988649517} + m_Layer: 9 + m_Name: VisualLook + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &988649516 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 988649515} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 211259727} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &988649517 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 988649515} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d247ba06193faa74d9335f5481b2b56c, type: 3} + m_Name: + m_EditorClassIdentifier: + skeletonDataAsset: {fileID: 11400000, guid: ad9bc316ced5375449444c992ee73cee, type: 2} + initialSkinName: 01 + fixPrefabOverrideViaMeshFilter: 2 + initialFlipX: 0 + initialFlipY: 0 + updateWhenInvisible: 3 + separatorSlotNames: [] + zSpacing: 0 + useClipping: 1 + immutableTriangles: 0 + pmaVertexColors: 1 + clearStateOnDisable: 0 + tintBlack: 0 + singleSubmesh: 0 + fixDrawOrder: 0 + addNormals: 0 + calculateTangents: 0 + maskInteraction: 0 + maskMaterials: + materialsMaskDisabled: [] + materialsInsideMask: [] + materialsOutsideMask: [] + disableRenderingOnOverride: 1 + physicsPositionInheritanceFactor: {x: 1, y: 1} + physicsRotationInheritanceFactor: 1 + physicsMovementRelativeTo: {fileID: 0} + updateTiming: 1 + unscaledTime: 0 + _animationName: + loop: 1 + timeScale: 1 +--- !u!23 &988649518 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 988649515} + 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_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: c5ff73efdfe597a488e245216fd5d707, 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_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 5 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &988649519 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 988649515} + m_Mesh: {fileID: 0} +--- !u!1 &1049919588 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1049919592} + - component: {fileID: 1049919591} + - component: {fileID: 1049919590} + - component: {fileID: 1049919589} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1049919589 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1049919588} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 16383 +--- !u!114 &1049919590 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1049919588} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 1920, y: 1080} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0.5 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!223 &1049919591 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1049919588} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_VertexColorAlwaysGammaSpace: 1 + m_AdditionalShaderChannelsFlag: 25 + m_UpdateRectTransformForStandalone: 0 + m_SortingLayerID: -1197429611 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &1049919592 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1049919588} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 114124396} + 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: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!1 &1178042444 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1178042445} + - component: {fileID: 1178042446} + - component: {fileID: 1178042447} + m_Layer: 6 + m_Name: Ground + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1178042445 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1178042444} + serializedVersion: 2 + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 50, y: 50, z: 50} + m_ConstrainProportionsScale: 1 + m_Children: [] + m_Father: {fileID: 461791772} + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!212 &1178042446 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1178042444} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + 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: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 21300000, guid: 92ec0c30f0488744d8bb594477258f40, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 1} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!65 &1178042447 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1178042444} + 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: 1, y: 0.85, z: 0.20000005} + m_Center: {x: 0, y: 0, z: 0.1} --- !u!1 &1222632320 GameObject: m_ObjectHideFlags: 0 @@ -1195,7 +2006,8 @@ Transform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: [] + m_Children: + - {fileID: 461791772} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1395162455 @@ -1433,6 +2245,84 @@ MonoBehaviour: m_LightCookieSize: {x: 1, y: 1} m_LightCookieOffset: {x: 0, y: 0} m_SoftShadowQuality: 0 +--- !u!1 &1619849087 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1619849090} + - component: {fileID: 1619849089} + - component: {fileID: 1619849088} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1619849088 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1619849087} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 01614664b831546d2ae94a42149d80ac, type: 3} + m_Name: + m_EditorClassIdentifier: + m_SendPointerHoverToParent: 1 + m_MoveRepeatDelay: 0.5 + m_MoveRepeatRate: 0.1 + m_XRTrackingOrigin: {fileID: 0} + m_ActionsAsset: {fileID: -944628639613478452, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_PointAction: {fileID: -1654692200621890270, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_MoveAction: {fileID: -8784545083839296357, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_SubmitAction: {fileID: 392368643174621059, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_CancelAction: {fileID: 7727032971491509709, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_LeftClickAction: {fileID: 3001919216989983466, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_MiddleClickAction: {fileID: -2185481485913320682, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_RightClickAction: {fileID: -4090225696740746782, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_ScrollWheelAction: {fileID: 6240969308177333660, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_TrackedDevicePositionAction: {fileID: 6564999863303420839, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_TrackedDeviceOrientationAction: {fileID: 7970375526676320489, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_DeselectOnBackgroundClick: 1 + m_PointerBehavior: 0 + m_CursorLockBehavior: 0 +--- !u!114 &1619849089 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1619849087} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 10 +--- !u!4 &1619849090 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1619849087} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1628404463 PrefabInstance: m_ObjectHideFlags: 0 @@ -1564,6 +2454,9 @@ SceneRoots: - {fileID: 355668244} - {fileID: 1222632321} - {fileID: 1231728096} + - {fileID: 1619849090} + - {fileID: 119395941} + - {fileID: 1049919592} - {fileID: 1896021280} - {fileID: 1395162455} - {fileID: 1245611233} @@ -1574,3 +2467,4 @@ SceneRoots: - {fileID: 852387592} - {fileID: 1253205195} - {fileID: 20736010} + - {fileID: 211259727} diff --git a/Assets/02.Scripts/BlueWater.inputactions b/Assets/02.Scripts/BlueWater.inputactions deleted file mode 100644 index 14207b90f..000000000 --- a/Assets/02.Scripts/BlueWater.inputactions +++ /dev/null @@ -1,876 +0,0 @@ -{ - "name": "BlueWater", - "maps": [ - { - "name": "Tycoon", - "id": "9fe03cc1-5cd3-4b79-a95e-461613cb242e", - "actions": [ - { - "name": "Move", - "type": "Value", - "id": "e46165d9-8066-4400-8950-9b7d4bb9ca75", - "expectedControlType": "Vector2", - "processors": "", - "interactions": "", - "initialStateCheck": true - }, - { - "name": "AssaultMode", - "type": "Button", - "id": "7d9814fb-48e0-4717-91c3-0c7b7d99972c", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "Interaction", - "type": "Button", - "id": "367e7267-d329-439d-9806-5e960b8114b5", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "InteractionHold", - "type": "Button", - "id": "a28fe5f5-b2a2-4794-8f99-fa2494aedfc3", - "expectedControlType": "Button", - "processors": "", - "interactions": "Hold(duration=1)", - "initialStateCheck": false - }, - { - "name": "Zkey", - "type": "Button", - "id": "548e1aff-2de9-4dcc-8fe3-6c20ee0e74d4", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "TakeAim", - "type": "Button", - "id": "e520b814-2e0b-4d05-853e-ac1a35bb6b51", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "Cancel", - "type": "Button", - "id": "c8a82170-8a07-4432-b22f-9ec40486ed27", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "Targeting", - "type": "Button", - "id": "bb26b6ad-feae-49d8-a4d8-3633bcabfcab", - "expectedControlType": "Button", - "processors": "", - "interactions": "Tap", - "initialStateCheck": false - }, - { - "name": "TargetingHold", - "type": "Button", - "id": "c3e552b9-a9be-4d38-8cde-27cc60f7888f", - "expectedControlType": "Button", - "processors": "", - "interactions": "Hold(duration=1)", - "initialStateCheck": false - }, - { - "name": "CancelHold", - "type": "Button", - "id": "b5508379-f9b3-45f9-ba2e-c16fb67bb36a", - "expectedControlType": "Button", - "processors": "", - "interactions": "Hold(duration=1)", - "initialStateCheck": false - }, - { - "name": "Attack", - "type": "Button", - "id": "5042e547-e870-4479-8263-b143f4d03597", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "ShiftKey", - "type": "Button", - "id": "6e363e5e-d384-4b7e-a9df-91159f5523ad", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "BuildMode", - "type": "Button", - "id": "c66de4c8-5638-4085-9856-105d2d2af71b", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "Esc", - "type": "Button", - "id": "4984fb85-de31-4918-9a06-61edbd3502e8", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - } - ], - "bindings": [ - { - "name": "WASD", - "id": "4dc5b54c-0e59-461e-a12d-470900925a36", - "path": "2DVector", - "interactions": "", - "processors": "", - "groups": "", - "action": "Move", - "isComposite": true, - "isPartOfComposite": false - }, - { - "name": "up", - "id": "07083b18-8b38-4c90-ae78-28c2927a5f82", - "path": "/w", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Move", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "down", - "id": "3b75699e-1063-4230-9ac3-95292c44d2bd", - "path": "/s", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Move", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "left", - "id": "6bdc290d-3bc8-4e00-b868-1977d3f2267d", - "path": "/a", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Move", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "right", - "id": "03206e08-b0b8-4a95-9bf8-a3e4fd10d4db", - "path": "/d", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Move", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "", - "id": "8e9091c9-b649-4709-bae7-3ca464124529", - "path": "/v", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "AssaultMode", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "334d8c88-f0ee-43d9-b62d-a1fdbd1bc338", - "path": "/e", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Interaction", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "df7a5259-c313-4b14-9cca-9e1acfc0a31a", - "path": "/e", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "InteractionHold", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "3db50dad-5cf1-4778-a8a6-27a83398045b", - "path": "/z", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Zkey", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "74928808-e5f4-4341-997b-0c0b40aa4b4a", - "path": "/space", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "TakeAim", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "f3c7c6ff-93c4-4bfe-9039-804d7c340f52", - "path": "/f", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Cancel", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "671ada78-e8be-4dcf-80af-2c4468d01253", - "path": "/q", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Targeting", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "d05dfab0-611f-4f60-b424-f14d98636c55", - "path": "/q", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "TargetingHold", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "3e2f42b7-0dd3-4c8b-bdd5-9be3254465c0", - "path": "/f", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "CancelHold", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "bb845af5-adc5-4848-b4a8-ceb3508cd585", - "path": "/leftButton", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Attack", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "c5b5e8bc-aca9-40bb-8e57-6bb1349f08d0", - "path": "/k", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Attack", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "8d33ba7e-c3f4-4c6d-bd6a-11a48f13fdb6", - "path": "/shift", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "ShiftKey", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "3d467a6e-a464-4bbb-b64f-e3317989fb87", - "path": "/r", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "BuildMode", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "9eacb0a0-9492-4531-9579-743e48d41b7e", - "path": "/escape", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Esc", - "isComposite": false, - "isPartOfComposite": false - } - ] - }, - { - "name": "Ocean", - "id": "b1d3abc9-6ca4-4c0f-a9c3-db8fd683f7c3", - "actions": [ - { - "name": "Move", - "type": "Value", - "id": "67bfec04-e227-486b-b9a6-76c7dd885dcf", - "expectedControlType": "Vector2", - "processors": "", - "interactions": "", - "initialStateCheck": true - }, - { - "name": "ShipBoost", - "type": "Button", - "id": "9e3ca776-4180-4ed4-9b93-912ce0040a12", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "HandleCannonLaunch", - "type": "Button", - "id": "2da9d549-9cb5-4226-9997-663a2b260f3b", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "ToggleLaunchMode", - "type": "Button", - "id": "94cfe30f-142f-421e-ac6c-5c7c67e412ad", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "CancelHold", - "type": "Button", - "id": "09a3f5df-e920-42fd-b7ff-6270ba8d2a5a", - "expectedControlType": "Button", - "processors": "", - "interactions": "Hold(duration=1)", - "initialStateCheck": false - }, - { - "name": "OpenItemInventory", - "type": "Button", - "id": "7599a756-4403-4fc2-954a-c177dde6cfd0", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - } - ], - "bindings": [ - { - "name": "WASD", - "id": "b77a8019-1df5-4ed5-9e9f-32cad21c709a", - "path": "2DVector", - "interactions": "", - "processors": "", - "groups": "", - "action": "Move", - "isComposite": true, - "isPartOfComposite": false - }, - { - "name": "up", - "id": "4e96c00b-3a97-4ebe-bb91-e359f9cbb258", - "path": "/w", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Move", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "down", - "id": "f80c2f4a-6807-43e6-87bd-81b6c8f5b1ef", - "path": "/s", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Move", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "left", - "id": "0918dbc6-5f09-425f-8159-5758d23f2d38", - "path": "/a", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Move", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "right", - "id": "f1945a0c-a660-431e-93ae-bd8dad361fc7", - "path": "/d", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Move", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "", - "id": "66e86ba2-d9d2-4d0b-8060-96ad0d191de7", - "path": "/leftButton", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "HandleCannonLaunch", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "5d84ecd2-06d2-4632-9fd8-5c02c7d7d8ce", - "path": "/rightButton", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "ToggleLaunchMode", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "07cc8c59-38df-4c23-a43a-1e105479fb4b", - "path": "/f", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "CancelHold", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "a1aa7408-f7ca-439a-8fec-8acfe5b0e9cb", - "path": "/i", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "OpenItemInventory", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "f22421e8-4fe1-4c7d-9a10-c4caccf8cac2", - "path": "/shift", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "ShipBoost", - "isComposite": false, - "isPartOfComposite": false - } - ] - }, - { - "name": "OceanUi", - "id": "363ea7eb-2dd1-4e1a-8636-0c0045e59355", - "actions": [ - { - "name": "Cancel", - "type": "Button", - "id": "0bd83ae0-d0f0-4908-816f-d546a142bd45", - "expectedControlType": "", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "CloseItemInventory", - "type": "Button", - "id": "093627e8-52f3-4c7e-ab67-077d16b7e665", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - } - ], - "bindings": [ - { - "name": "", - "id": "ead9149b-b55d-4a91-a23d-fca10e8d925a", - "path": "/escape", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Cancel", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "bbdb2092-10d3-4ae3-8075-3c4c51c58809", - "path": "/i", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "CloseItemInventory", - "isComposite": false, - "isPartOfComposite": false - } - ] - }, - { - "name": "Combat", - "id": "fcad259b-ca44-46e3-b008-1297fa7be828", - "actions": [ - { - "name": "Move", - "type": "Value", - "id": "4714fdf1-f399-40c7-b623-660c9bfff052", - "expectedControlType": "Vector2", - "processors": "", - "interactions": "", - "initialStateCheck": true - }, - { - "name": "Attack", - "type": "Button", - "id": "5ff50411-308e-490e-acb2-e1001785169d", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "Dash", - "type": "Button", - "id": "07c70113-456d-4ae6-a273-92bfa09153c2", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "ActivateMainSkill", - "type": "Button", - "id": "baf777af-1b73-43bf-af41-5b0b4b4e17a5", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "OpenMenu", - "type": "Button", - "id": "be2734fa-1283-41ff-8cba-f1160933011a", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "OpenItemInventory", - "type": "Button", - "id": "2248f901-1467-4f42-993e-187a6e0f8673", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - } - ], - "bindings": [ - { - "name": "WASD", - "id": "362fb18c-8b50-4fcd-9bc9-9fcab5fd2ce5", - "path": "2DVector", - "interactions": "", - "processors": "", - "groups": "", - "action": "Move", - "isComposite": true, - "isPartOfComposite": false - }, - { - "name": "up", - "id": "36746c9d-eca6-4ff8-bcec-2d658d907744", - "path": "/w", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Move", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "down", - "id": "8420a87e-ccc1-4940-addd-1516ac2896af", - "path": "/s", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Move", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "left", - "id": "6ac0b570-a29a-40f9-b039-c4085ef669a8", - "path": "/a", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Move", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "right", - "id": "975926ee-895b-4858-b17d-c8ccc3142fb4", - "path": "/d", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Move", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "", - "id": "17f1b73a-900f-477d-b3aa-2cfc0335591f", - "path": "/leftButton", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Attack", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "acdb5d7e-efe0-4c9a-9c7c-c6810fc37c72", - "path": "/k", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Attack", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "4a22ea68-00e5-46bf-b622-b6ceb0351141", - "path": "/space", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Dash", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "c6e279c5-9d30-43fa-b4ab-baacff979160", - "path": "/rightButton", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "ActivateMainSkill", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "a6310b05-6f93-471c-9ceb-53d5cde297b2", - "path": "/i", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "OpenItemInventory", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "ef35184a-bd13-4850-b2a7-b95df05930f2", - "path": "/escape", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "OpenMenu", - "isComposite": false, - "isPartOfComposite": false - } - ] - }, - { - "name": "CombatUi", - "id": "8cf7d346-163b-432f-ab7a-d2eeeb534f3a", - "actions": [ - { - "name": "Cancel", - "type": "Button", - "id": "e7d49d7a-f0a9-48a3-ace4-22f003f58f96", - "expectedControlType": "", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "InteractionUi", - "type": "Button", - "id": "e9c65e0f-6acb-42c1-bb63-2e3c7d92829e", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "CloseItemInventory", - "type": "Button", - "id": "92659d92-5f25-4712-8a45-d7b527ac56a9", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - } - ], - "bindings": [ - { - "name": "", - "id": "4318851f-7934-4e8f-95a9-64f292a09906", - "path": "/escape", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Cancel", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "ae1f40de-6d3f-4863-b0e3-163be3e2c095", - "path": "/i", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "CloseItemInventory", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "f92c26c3-fa84-4ab1-a9ce-4bce6d4ffeca", - "path": "/e", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "InteractionUi", - "isComposite": false, - "isPartOfComposite": false - } - ] - }, - { - "name": "CombatTitle", - "id": "7765606a-347d-4d4c-8e03-c355ab53d76a", - "actions": [ - { - "name": "MoveScene", - "type": "Button", - "id": "0e8aef50-7672-4cdd-bba8-900c12c650c7", - "expectedControlType": "", - "processors": "", - "interactions": "", - "initialStateCheck": false - } - ], - "bindings": [ - { - "name": "", - "id": "6341a4ec-8ab6-433c-9a57-b6f22d15ce1f", - "path": "*/{PrimaryAction}", - "interactions": "", - "processors": "", - "groups": "", - "action": "MoveScene", - "isComposite": false, - "isPartOfComposite": false - } - ] - } - ], - "controlSchemes": [ - { - "name": "Keyboard&Mouse", - "bindingGroup": "Keyboard&Mouse", - "devices": [ - { - "devicePath": "", - "isOptional": false, - "isOR": false - }, - { - "devicePath": "", - "isOptional": false, - "isOR": false - } - ] - }, - { - "name": "Gamepad", - "bindingGroup": "Gamepad", - "devices": [ - { - "devicePath": "", - "isOptional": false, - "isOR": false - } - ] - } - ] -} \ No newline at end of file diff --git a/Assets/02.Scripts/Character/Player/Combat/CombatPlayer.cs b/Assets/02.Scripts/Character/Player/Combat/CombatPlayer.cs index 728fa7c0f..b6ab3f1f9 100644 --- a/Assets/02.Scripts/Character/Player/Combat/CombatPlayer.cs +++ b/Assets/02.Scripts/Character/Player/Combat/CombatPlayer.cs @@ -106,8 +106,6 @@ namespace BlueWater.Players.Combat CombatAttacker.InitializeComponents(Rigidbody, AnimationController, CombatMovement); PlayerHealthPoint.InitializeComponents(SpriteRenderer); CombatStatus.InitializeComponents(SpriteRenderer); - - GameManager.Instance.SetCurrentCombatPlayer(this); } #endregion diff --git a/Assets/02.Scripts/Character/Player/Tycoon.meta b/Assets/02.Scripts/Character/Player/Tycoon.meta new file mode 100644 index 000000000..d36d6ecfc --- /dev/null +++ b/Assets/02.Scripts/Character/Player/Tycoon.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 575f0330bd6c3a440955477cc0715a71 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/02.Scripts/Character/Player/Tycoon/TycoonInput.cs b/Assets/02.Scripts/Character/Player/Tycoon/TycoonInput.cs new file mode 100644 index 000000000..3b30d2158 --- /dev/null +++ b/Assets/02.Scripts/Character/Player/Tycoon/TycoonInput.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections; +using BlueWater.Uis; +using UnityEngine; +using UnityEngine.InputSystem; + +namespace BlueWater.Players.Tycoons +{ + public class TycoonInput : MonoBehaviour + { + // variables + #region variables + + // Components + private PlayerInput _playerInput; + + // Events + public event Action OnMoveInputReceived; + + #endregion + + // Initialize methods + #region Initialize methods + + public void InitializeComponents(PlayerInput playerInput) + { + _playerInput = playerInput; + _playerInput.enabled = true; + PlayerInputKeyManager.Instance.SetCurrentPlayerInput(_playerInput); + PlayerInputKeyManager.Instance.SwitchCurrentActionMap(InputActionMaps.Tycoon); + + StartCoroutine(nameof(PlayerInputCoroutine)); + } + + private IEnumerator PlayerInputCoroutine() + { + yield return new WaitForSeconds(0.5f); + + PlayerInputKeyManager.Instance.DisableAllActionMaps(); + PlayerInputKeyManager.Instance.EnableCurrentPlayerInput(); + PlayerInputKeyManager.Instance.SwitchCurrentActionMap(InputActionMaps.Tycoon); + } + + #endregion + + // Player input methods + #region Player input methods + + public void OnMove(InputAction.CallbackContext context) + { + var movementInput = context.ReadValue(); + OnMoveInputReceived?.Invoke(movementInput); + } + + public void OnInteraction(InputAction.CallbackContext context) + { + if (context.performed) + { + + } + } + + #endregion + } +} \ No newline at end of file diff --git a/Assets/02.Scripts/Character/Player/Tycoon/TycoonInput.cs.meta b/Assets/02.Scripts/Character/Player/Tycoon/TycoonInput.cs.meta new file mode 100644 index 000000000..f3502294e --- /dev/null +++ b/Assets/02.Scripts/Character/Player/Tycoon/TycoonInput.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 2bc02c60fe9bf724885e9f5713f900ee diff --git a/Assets/02.Scripts/Character/Player/Tycoon/TycoonMovement.cs b/Assets/02.Scripts/Character/Player/Tycoon/TycoonMovement.cs new file mode 100644 index 000000000..b62b4b7d3 --- /dev/null +++ b/Assets/02.Scripts/Character/Player/Tycoon/TycoonMovement.cs @@ -0,0 +1,131 @@ +using BlueWater.Interfaces; +using UnityEngine; + +namespace BlueWater.Players.Tycoons +{ + public class TycoonMovement : MonoBehaviour, IPhysicMovable + { + // Variables + #region Variables + + // Components + public Rigidbody Rigidbody { get; private set; } + private Transform _visualLook; + private TycoonSpineController _tycoonSpineController; + + // Move + [field: SerializeField, Range(1f, 10f), Tooltip("이동 속도")] + public float MoveSpeed { get; private set; } = 7f; + + public bool EnableMove { get; private set; } = true; + + private bool _isMoving; + public bool IsMoving + { + get => _isMoving; + private set + { + if (_isMoving == value) return; + + _isMoving = value; + _tycoonSpineController.PlayAnimation(_isMoving + ? TycoonSpineAnimationName.run.ToString() + : TycoonSpineAnimationName.idle.ToString(), true); + } + } + + private Vector3 _inputDirection; + + private Vector3 _currentDirection = Vector3.back; + public Vector3 CurrentDirection + { + get => _currentDirection; + set + { + if (value == Vector3.zero) return; + + _currentDirection = value; + } + } + + private float _finalSpeed; + + #endregion + + // Unity events + #region Unity events + + private void Update() + { + FlipVisualLook(); + } + + private void FixedUpdate() + { + if (!CanMove()) return; + + ApplyMovement(); + } + + #endregion + + // Initialize Methods + #region Initialize Methods + + public void InitializeComponents(Rigidbody rigidbody, Transform visualLook, TycoonSpineController tycoonSpineController) + { + Rigidbody = rigidbody; + _visualLook = visualLook; + _tycoonSpineController = tycoonSpineController; + } + + #endregion + + // Methods + #region Methods + + // Event methods + public void HandleInputMovement(Vector2 movementInput) + { + _inputDirection = new Vector3(movementInput.x, 0, movementInput.y).normalized; + } + + public void HandleEnableMove() => EnableMove = true; + public void HandleDisableMove() => EnableMove = false; + + // Methods + private void FlipVisualLook() + { + var localScale = _visualLook.localScale; + localScale.x = CurrentDirection.x switch + { + > 0.01f => -Mathf.Abs(localScale.x), + < -0.01f => Mathf.Abs(localScale.x), + _ => localScale.x + }; + _visualLook.localScale = localScale; + } + + // Move + public bool CanMove() + { + return EnableMove; + } + + public void AddForce(Vector3 force, ForceMode forceMode) + { + Rigidbody.AddForce(force, forceMode); + } + + private void ApplyMovement() + { + CurrentDirection = _inputDirection; + IsMoving = _inputDirection != Vector3.zero; + + var finalVelocity = _inputDirection * (MoveSpeed * Time.deltaTime); + Rigidbody.MovePosition(transform.position + finalVelocity); + } + + #endregion + } +} \ No newline at end of file diff --git a/Assets/02.Scripts/Character/Player/Tycoon/TycoonMovement.cs.meta b/Assets/02.Scripts/Character/Player/Tycoon/TycoonMovement.cs.meta new file mode 100644 index 000000000..18dd8e5f9 --- /dev/null +++ b/Assets/02.Scripts/Character/Player/Tycoon/TycoonMovement.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: cb167e66df896c745a538310e5a52f61 diff --git a/Assets/02.Scripts/Character/Player/Tycoon/TycoonPlayer.cs b/Assets/02.Scripts/Character/Player/Tycoon/TycoonPlayer.cs new file mode 100644 index 000000000..62fc31575 --- /dev/null +++ b/Assets/02.Scripts/Character/Player/Tycoon/TycoonPlayer.cs @@ -0,0 +1,104 @@ +using Sirenix.OdinInspector; +using Spine.Unity; +using UnityEngine; +using UnityEngine.InputSystem; + +namespace BlueWater.Players.Tycoons +{ + public class TycoonPlayer : MonoBehaviour + { + // Variables + #region Variables + + // Components + [field: SerializeField] + public Rigidbody Rigidbody { get; private set; } + + [field: SerializeField] + public CapsuleCollider CharacterCollider { get; private set; } + + [field: SerializeField] + public PlayerInput PlayerInput { get; private set; } + + [field: SerializeField] + public Transform VisualLook { get; private set; } + + [field: SerializeField] + public SkeletonAnimation SkeletonAnimation { get; private set; } + + [field: SerializeField] + public TycoonSpineController TycoonSpineController { get; private set; } + + [field: SerializeField] + public TycoonInput TycoonInput { get; private set; } + + [field: SerializeField] + public TycoonMovement TycoonMovement { get; private set; } + + #endregion + + // Unity events + #region Unity events + + private void Awake() + { + InitializeComponents(); + InitializeChileComponents(); + } + + private void Start() + { + SubscribeEvents(); + } + + private void OnDestroy() + { + UnSubscribeEvents(); + } + + #endregion + + // Initialize methods + #region Initialize methods + + [Button("컴포넌트 초기화")] + private void InitializeComponents() + { + Rigidbody = GetComponent(); + CharacterCollider = GetComponent(); + PlayerInput = GetComponent(); + VisualLook = transform.Find("VisualLook"); + SkeletonAnimation = VisualLook.GetComponent(); + + TycoonSpineController = GetComponent(); + TycoonInput = GetComponent(); + TycoonMovement = GetComponent(); + } + + private void InitializeChileComponents() + { + TycoonSpineController.InitializeComponents(SkeletonAnimation); + TycoonInput.InitializeComponents(PlayerInput); + TycoonMovement.InitializeComponents(Rigidbody, VisualLook, TycoonSpineController); + } + + #endregion + + // Methods + #region Methods + + private void SubscribeEvents() + { + // Input + TycoonInput.OnMoveInputReceived += TycoonMovement.HandleInputMovement; + } + + private void UnSubscribeEvents() + { + // Input + TycoonInput.OnMoveInputReceived -= TycoonMovement.HandleInputMovement; + } + + #endregion + } +} \ No newline at end of file diff --git a/Assets/02.Scripts/Character/Player/Tycoon/TycoonPlayer.cs.meta b/Assets/02.Scripts/Character/Player/Tycoon/TycoonPlayer.cs.meta new file mode 100644 index 000000000..f7f565e3d --- /dev/null +++ b/Assets/02.Scripts/Character/Player/Tycoon/TycoonPlayer.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: fe62039701799b0468ff96958a2912a6 diff --git a/Assets/02.Scripts/Character/Player/Tycoon/TycoonSpineController.cs b/Assets/02.Scripts/Character/Player/Tycoon/TycoonSpineController.cs new file mode 100644 index 000000000..62c6ce9b0 --- /dev/null +++ b/Assets/02.Scripts/Character/Player/Tycoon/TycoonSpineController.cs @@ -0,0 +1,59 @@ +using Spine; +using Spine.Unity; +using UnityEngine; + +namespace BlueWater.Players.Tycoons +{ + public enum TycoonSpineAnimationName + { + idle = 0, + run + } + + public class TycoonSpineController : SpineController + { + [SerializeField] + private string _initialSkinName = "01"; + + // Initialize methods + #region Initialize methods + + public override void InitializeComponents(SkeletonAnimation skeletonAnimation) + { + base.InitializeComponents(skeletonAnimation); + + SetSkin(_initialSkinName); + PlayAnimation(TycoonSpineAnimationName.idle.ToString(), true); + } + + #endregion + + protected override void OnAnimationStart(TrackEntry trackEntry) + { + var animationName = trackEntry.Animation.Name; + + if (animationName == TycoonSpineAnimationName.idle.ToString()) + { + } + else if (animationName == TycoonSpineAnimationName.run.ToString()) + { + + } + print($"{animationName} 애니메이션 완료"); + } + + protected override void OnAnimationComplete(TrackEntry trackEntry) + { + var animationName = trackEntry.Animation.Name; + + if (animationName == TycoonSpineAnimationName.idle.ToString()) + { + } + else if (animationName == TycoonSpineAnimationName.run.ToString()) + { + + } + print($"{animationName} 애니메이션 완료"); + } + } +} \ No newline at end of file diff --git a/Assets/02.Scripts/Character/Player/Tycoon/TycoonSpineController.cs.meta b/Assets/02.Scripts/Character/Player/Tycoon/TycoonSpineController.cs.meta new file mode 100644 index 000000000..09f48d8cf --- /dev/null +++ b/Assets/02.Scripts/Character/Player/Tycoon/TycoonSpineController.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 8130801e9ac84aa0874ac36c80383d9c +timeCreated: 1717669631 \ No newline at end of file diff --git a/Assets/02.Scripts/Character/SpineController.cs b/Assets/02.Scripts/Character/SpineController.cs new file mode 100644 index 000000000..96f8b0e2a --- /dev/null +++ b/Assets/02.Scripts/Character/SpineController.cs @@ -0,0 +1,97 @@ +using System; +using Spine; +using Spine.Unity; +using UnityEngine; +using AnimationState = Spine.AnimationState; + +namespace BlueWater.Players +{ + public abstract class SpineController : MonoBehaviour + { + // Variables + #region Variables + + // Components + protected SkeletonAnimation SkeletonAnimation; + protected AnimationState AnimationState; + + #endregion + + // Unity events + #region Unity events + + private void OnDestroy() + { + if (AnimationState != null) + { + AnimationState.Start -= OnAnimationStart; + AnimationState.Complete -= OnAnimationComplete; + } + } + + #endregion + + // Initialize methods + #region Initialize methods + + public virtual void InitializeComponents(SkeletonAnimation skeletonAnimation) + { + if (skeletonAnimation == null) + { + Debug.LogError("SkeletonAnimation component is null."); + return; + } + + SkeletonAnimation = skeletonAnimation; + AnimationState = SkeletonAnimation.AnimationState; + + if (AnimationState != null) + { + AnimationState.Complete += OnAnimationComplete; + } + else + { + Debug.LogError("AnimationState is not initialized."); + } + } + + #endregion + + // Methods + #region Methods + + public void PlayAnimation(string animationName, bool isLoopActive, float speed = 1f) + { + if (SkeletonAnimation == null && AnimationState == null) return; + + if (string.IsNullOrEmpty(animationName)) + { + Debug.LogError($"{animationName}의 애니메이션은 존재하지 않습니다."); + return; + } + + AnimationState.TimeScale = speed; + AnimationState.SetAnimation(0, animationName, isLoopActive); + } + + public void SetSkin(string skinName) + { + if (SkeletonAnimation == null && AnimationState == null) return; + + if (string.IsNullOrEmpty(skinName)) + { + Debug.LogError($"{skinName}의 스킨 이름은 존재하지 않습니다."); + return; + } + + SkeletonAnimation.Skeleton.SetSkin(skinName); + SkeletonAnimation.Skeleton.SetSlotsToSetupPose(); + AnimationState.Apply(SkeletonAnimation.Skeleton); + } + + protected abstract void OnAnimationStart(TrackEntry trackEntry); + protected abstract void OnAnimationComplete(TrackEntry trackEntry); + + #endregion + } +} \ No newline at end of file diff --git a/Assets/02.Scripts/Character/SpineController.cs.meta b/Assets/02.Scripts/Character/SpineController.cs.meta new file mode 100644 index 000000000..6699d5888 --- /dev/null +++ b/Assets/02.Scripts/Character/SpineController.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: be4f815e5e3c0d5459559bdc0b8bbbfb \ No newline at end of file diff --git a/Assets/02.Scripts/CombatCameraManager.cs b/Assets/02.Scripts/CombatCameraManager.cs index 028b5dd3a..f683fe700 100644 --- a/Assets/02.Scripts/CombatCameraManager.cs +++ b/Assets/02.Scripts/CombatCameraManager.cs @@ -40,14 +40,14 @@ namespace BlueWater { if (!GameManager.Instance) return; - GameManager.Instance.OnInstantiateCombatPlayer += SetFollow; + GameManager.Instance.OnInstantiatePlayer += SetFollow; } private void OnDestroy() { if (!GameManager.Instance) return; - GameManager.Instance.OnInstantiateCombatPlayer -= SetFollow; + GameManager.Instance.OnInstantiatePlayer -= SetFollow; } #endregion diff --git a/Assets/02.Scripts/GameManager.cs b/Assets/02.Scripts/GameManager.cs index 5d98e9c93..92922fff7 100644 --- a/Assets/02.Scripts/GameManager.cs +++ b/Assets/02.Scripts/GameManager.cs @@ -12,14 +12,13 @@ namespace BlueWater public CombatPlayer CurrentCombatPlayer { get; private set; } // Events - public event Action OnInstantiateCombatPlayer; + public event Action OnInstantiatePlayer; public void InstantiateCombatPlayer(Vector3 position, Quaternion rotation = default) { var instantiatePlayer = Instantiate(_combatPlayerPrefab, position, rotation).GetComponent(); - OnInstantiateCombatPlayer?.Invoke(instantiatePlayer.transform); + CurrentCombatPlayer = instantiatePlayer; + OnInstantiatePlayer?.Invoke(instantiatePlayer.transform); } - - public void SetCurrentCombatPlayer(CombatPlayer combatPlayer) => CurrentCombatPlayer = combatPlayer; } } \ No newline at end of file diff --git a/Assets/02.Scripts/InputSystem_Actions.inputactions b/Assets/02.Scripts/InputSystem_Actions.inputactions new file mode 100644 index 000000000..f58f34b04 --- /dev/null +++ b/Assets/02.Scripts/InputSystem_Actions.inputactions @@ -0,0 +1,1113 @@ +{ + "name": "InputSystem_Actions", + "maps": [ + { + "name": "Player", + "id": "df70fa95-8a34-4494-b137-73ab6b9c7d37", + "actions": [ + { + "name": "Move", + "type": "Value", + "id": "351f2ccd-1f9f-44bf-9bec-d62ac5c5f408", + "expectedControlType": "Vector2", + "processors": "", + "interactions": "", + "initialStateCheck": true + }, + { + "name": "Look", + "type": "Value", + "id": "6b444451-8a00-4d00-a97e-f47457f736a8", + "expectedControlType": "Vector2", + "processors": "", + "interactions": "", + "initialStateCheck": true + }, + { + "name": "Attack", + "type": "Button", + "id": "6c2ab1b8-8984-453a-af3d-a3c78ae1679a", + "expectedControlType": "Button", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "Interact", + "type": "Button", + "id": "852140f2-7766-474d-8707-702459ba45f3", + "expectedControlType": "Button", + "processors": "", + "interactions": "Hold", + "initialStateCheck": false + }, + { + "name": "Crouch", + "type": "Button", + "id": "27c5f898-bc57-4ee1-8800-db469aca5fe3", + "expectedControlType": "Button", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "Jump", + "type": "Button", + "id": "f1ba0d36-48eb-4cd5-b651-1c94a6531f70", + "expectedControlType": "Button", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "Previous", + "type": "Button", + "id": "2776c80d-3c14-4091-8c56-d04ced07a2b0", + "expectedControlType": "Button", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "Next", + "type": "Button", + "id": "b7230bb6-fc9b-4f52-8b25-f5e19cb2c2ba", + "expectedControlType": "Button", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "Sprint", + "type": "Button", + "id": "641cd816-40e6-41b4-8c3d-04687c349290", + "expectedControlType": "Button", + "processors": "", + "interactions": "", + "initialStateCheck": false + } + ], + "bindings": [ + { + "name": "", + "id": "978bfe49-cc26-4a3d-ab7b-7d7a29327403", + "path": "/leftStick", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Move", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "WASD", + "id": "00ca640b-d935-4593-8157-c05846ea39b3", + "path": "Dpad", + "interactions": "", + "processors": "", + "groups": "", + "action": "Move", + "isComposite": true, + "isPartOfComposite": false + }, + { + "name": "up", + "id": "e2062cb9-1b15-46a2-838c-2f8d72a0bdd9", + "path": "/w", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "up", + "id": "8180e8bd-4097-4f4e-ab88-4523101a6ce9", + "path": "/upArrow", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "320bffee-a40b-4347-ac70-c210eb8bc73a", + "path": "/s", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "1c5327b5-f71c-4f60-99c7-4e737386f1d1", + "path": "/downArrow", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "d2581a9b-1d11-4566-b27d-b92aff5fabbc", + "path": "/a", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "2e46982e-44cc-431b-9f0b-c11910bf467a", + "path": "/leftArrow", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "fcfe95b8-67b9-4526-84b5-5d0bc98d6400", + "path": "/d", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "77bff152-3580-4b21-b6de-dcd0c7e41164", + "path": "/rightArrow", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "", + "id": "1635d3fe-58b6-4ba9-a4e2-f4b964f6b5c8", + "path": "/{Primary2DAxis}", + "interactions": "", + "processors": "", + "groups": "XR", + "action": "Move", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "3ea4d645-4504-4529-b061-ab81934c3752", + "path": "/stick", + "interactions": "", + "processors": "", + "groups": "Joystick", + "action": "Move", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "c1f7a91b-d0fd-4a62-997e-7fb9b69bf235", + "path": "/rightStick", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Look", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "8c8e490b-c610-4785-884f-f04217b23ca4", + "path": "/delta", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse;Touch", + "action": "Look", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "3e5f5442-8668-4b27-a940-df99bad7e831", + "path": "/{Hatswitch}", + "interactions": "", + "processors": "", + "groups": "Joystick", + "action": "Look", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "143bb1cd-cc10-4eca-a2f0-a3664166fe91", + "path": "/buttonWest", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Attack", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "05f6913d-c316-48b2-a6bb-e225f14c7960", + "path": "/leftButton", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Attack", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "886e731e-7071-4ae4-95c0-e61739dad6fd", + "path": "/primaryTouch/tap", + "interactions": "", + "processors": "", + "groups": ";Touch", + "action": "Attack", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "ee3d0cd2-254e-47a7-a8cb-bc94d9658c54", + "path": "/trigger", + "interactions": "", + "processors": "", + "groups": "Joystick", + "action": "Attack", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "8255d333-5683-4943-a58a-ccb207ff1dce", + "path": "/{PrimaryAction}", + "interactions": "", + "processors": "", + "groups": "XR", + "action": "Attack", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "b3c1c7f0-bd20-4ee7-a0f1-899b24bca6d7", + "path": "/enter", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Attack", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "cbac6039-9c09-46a1-b5f2-4e5124ccb5ed", + "path": "/2", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Next", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "e15ca19d-e649-4852-97d5-7fe8ccc44e94", + "path": "/dpad/right", + "interactions": "", + "processors": "", + "groups": "Gamepad", + "action": "Next", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "f2e9ba44-c423-42a7-ad56-f20975884794", + "path": "/leftShift", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Sprint", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "8cbb2f4b-a784-49cc-8d5e-c010b8c7f4e6", + "path": "/leftStickPress", + "interactions": "", + "processors": "", + "groups": "Gamepad", + "action": "Sprint", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "d8bf24bf-3f2f-4160-a97c-38ec1eb520ba", + "path": "/trigger", + "interactions": "", + "processors": "", + "groups": "XR", + "action": "Sprint", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "eb40bb66-4559-4dfa-9a2f-820438abb426", + "path": "/space", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Jump", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "daba33a1-ad0c-4742-a909-43ad1cdfbeb6", + "path": "/buttonSouth", + "interactions": "", + "processors": "", + "groups": "Gamepad", + "action": "Jump", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "603f3daf-40bd-4854-8724-93e8017f59e3", + "path": "/secondaryButton", + "interactions": "", + "processors": "", + "groups": "XR", + "action": "Jump", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "1534dc16-a6aa-499d-9c3a-22b47347b52a", + "path": "/1", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Previous", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "25060bbd-a3a6-476e-8fba-45ae484aad05", + "path": "/dpad/left", + "interactions": "", + "processors": "", + "groups": "Gamepad", + "action": "Previous", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "1c04ea5f-b012-41d1-a6f7-02e963b52893", + "path": "/e", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Interact", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "b3f66d0b-7751-423f-908b-a11c5bd95930", + "path": "/buttonNorth", + "interactions": "", + "processors": "", + "groups": "Gamepad", + "action": "Interact", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "4f4649ac-64a8-4a73-af11-b3faef356a4d", + "path": "/buttonEast", + "interactions": "", + "processors": "", + "groups": "Gamepad", + "action": "Crouch", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "36e52cba-0905-478e-a818-f4bfcb9f3b9a", + "path": "/c", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Crouch", + "isComposite": false, + "isPartOfComposite": false + } + ] + }, + { + "name": "UI", + "id": "272f6d14-89ba-496f-b7ff-215263d3219f", + "actions": [ + { + "name": "Navigate", + "type": "PassThrough", + "id": "c95b2375-e6d9-4b88-9c4c-c5e76515df4b", + "expectedControlType": "Vector2", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "Submit", + "type": "Button", + "id": "7607c7b6-cd76-4816-beef-bd0341cfe950", + "expectedControlType": "Button", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "Cancel", + "type": "Button", + "id": "15cef263-9014-4fd5-94d9-4e4a6234a6ef", + "expectedControlType": "Button", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "Point", + "type": "PassThrough", + "id": "32b35790-4ed0-4e9a-aa41-69ac6d629449", + "expectedControlType": "Vector2", + "processors": "", + "interactions": "", + "initialStateCheck": true + }, + { + "name": "Click", + "type": "PassThrough", + "id": "3c7022bf-7922-4f7c-a998-c437916075ad", + "expectedControlType": "Button", + "processors": "", + "interactions": "", + "initialStateCheck": true + }, + { + "name": "RightClick", + "type": "PassThrough", + "id": "44b200b1-1557-4083-816c-b22cbdf77ddf", + "expectedControlType": "Button", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "MiddleClick", + "type": "PassThrough", + "id": "dad70c86-b58c-4b17-88ad-f5e53adf419e", + "expectedControlType": "Button", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "ScrollWheel", + "type": "PassThrough", + "id": "0489e84a-4833-4c40-bfae-cea84b696689", + "expectedControlType": "Vector2", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "TrackedDevicePosition", + "type": "PassThrough", + "id": "24908448-c609-4bc3-a128-ea258674378a", + "expectedControlType": "Vector3", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "TrackedDeviceOrientation", + "type": "PassThrough", + "id": "9caa3d8a-6b2f-4e8e-8bad-6ede561bd9be", + "expectedControlType": "Quaternion", + "processors": "", + "interactions": "", + "initialStateCheck": false + } + ], + "bindings": [ + { + "name": "Gamepad", + "id": "809f371f-c5e2-4e7a-83a1-d867598f40dd", + "path": "2DVector", + "interactions": "", + "processors": "", + "groups": "", + "action": "Navigate", + "isComposite": true, + "isPartOfComposite": false + }, + { + "name": "up", + "id": "14a5d6e8-4aaf-4119-a9ef-34b8c2c548bf", + "path": "/leftStick/up", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "up", + "id": "9144cbe6-05e1-4687-a6d7-24f99d23dd81", + "path": "/rightStick/up", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "2db08d65-c5fb-421b-983f-c71163608d67", + "path": "/leftStick/down", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "58748904-2ea9-4a80-8579-b500e6a76df8", + "path": "/rightStick/down", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "8ba04515-75aa-45de-966d-393d9bbd1c14", + "path": "/leftStick/left", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "712e721c-bdfb-4b23-a86c-a0d9fcfea921", + "path": "/rightStick/left", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "fcd248ae-a788-4676-a12e-f4d81205600b", + "path": "/leftStick/right", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "1f04d9bc-c50b-41a1-bfcc-afb75475ec20", + "path": "/rightStick/right", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "", + "id": "fb8277d4-c5cd-4663-9dc7-ee3f0b506d90", + "path": "/dpad", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "Joystick", + "id": "e25d9774-381c-4a61-b47c-7b6b299ad9f9", + "path": "2DVector", + "interactions": "", + "processors": "", + "groups": "", + "action": "Navigate", + "isComposite": true, + "isPartOfComposite": false + }, + { + "name": "up", + "id": "3db53b26-6601-41be-9887-63ac74e79d19", + "path": "/stick/up", + "interactions": "", + "processors": "", + "groups": "Joystick", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "0cb3e13e-3d90-4178-8ae6-d9c5501d653f", + "path": "/stick/down", + "interactions": "", + "processors": "", + "groups": "Joystick", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "0392d399-f6dd-4c82-8062-c1e9c0d34835", + "path": "/stick/left", + "interactions": "", + "processors": "", + "groups": "Joystick", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "942a66d9-d42f-43d6-8d70-ecb4ba5363bc", + "path": "/stick/right", + "interactions": "", + "processors": "", + "groups": "Joystick", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "Keyboard", + "id": "ff527021-f211-4c02-933e-5976594c46ed", + "path": "2DVector", + "interactions": "", + "processors": "", + "groups": "", + "action": "Navigate", + "isComposite": true, + "isPartOfComposite": false + }, + { + "name": "up", + "id": "563fbfdd-0f09-408d-aa75-8642c4f08ef0", + "path": "/w", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "up", + "id": "eb480147-c587-4a33-85ed-eb0ab9942c43", + "path": "/upArrow", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "2bf42165-60bc-42ca-8072-8c13ab40239b", + "path": "/s", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "85d264ad-e0a0-4565-b7ff-1a37edde51ac", + "path": "/downArrow", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "74214943-c580-44e4-98eb-ad7eebe17902", + "path": "/a", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "cea9b045-a000-445b-95b8-0c171af70a3b", + "path": "/leftArrow", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "8607c725-d935-4808-84b1-8354e29bab63", + "path": "/d", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "4cda81dc-9edd-4e03-9d7c-a71a14345d0b", + "path": "/rightArrow", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "", + "id": "9e92bb26-7e3b-4ec4-b06b-3c8f8e498ddc", + "path": "*/{Submit}", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse;Gamepad;Touch;Joystick;XR", + "action": "Submit", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "82627dcc-3b13-4ba9-841d-e4b746d6553e", + "path": "*/{Cancel}", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse;Gamepad;Touch;Joystick;XR", + "action": "Cancel", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "c52c8e0b-8179-41d3-b8a1-d149033bbe86", + "path": "/position", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Point", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "e1394cbc-336e-44ce-9ea8-6007ed6193f7", + "path": "/position", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Point", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "5693e57a-238a-46ed-b5ae-e64e6e574302", + "path": "/touch*/position", + "interactions": "", + "processors": "", + "groups": "Touch", + "action": "Point", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "4faf7dc9-b979-4210-aa8c-e808e1ef89f5", + "path": "/leftButton", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Click", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "8d66d5ba-88d7-48e6-b1cd-198bbfef7ace", + "path": "/tip", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Click", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "47c2a644-3ebc-4dae-a106-589b7ca75b59", + "path": "/touch*/press", + "interactions": "", + "processors": "", + "groups": "Touch", + "action": "Click", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "bb9e6b34-44bf-4381-ac63-5aa15d19f677", + "path": "/trigger", + "interactions": "", + "processors": "", + "groups": "XR", + "action": "Click", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "38c99815-14ea-4617-8627-164d27641299", + "path": "/scroll", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "ScrollWheel", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "4c191405-5738-4d4b-a523-c6a301dbf754", + "path": "/rightButton", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "RightClick", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "24066f69-da47-44f3-a07e-0015fb02eb2e", + "path": "/middleButton", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "MiddleClick", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "7236c0d9-6ca3-47cf-a6ee-a97f5b59ea77", + "path": "/devicePosition", + "interactions": "", + "processors": "", + "groups": "XR", + "action": "TrackedDevicePosition", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "23e01e3a-f935-4948-8d8b-9bcac77714fb", + "path": "/deviceRotation", + "interactions": "", + "processors": "", + "groups": "XR", + "action": "TrackedDeviceOrientation", + "isComposite": false, + "isPartOfComposite": false + } + ] + }, + { + "name": "Test", + "id": "ce769ac7-480d-41bc-b713-cf63a750c639", + "actions": [ + { + "name": "New action", + "type": "Button", + "id": "2236710f-e3a4-4d53-8403-9447e891ead4", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false + } + ], + "bindings": [ + { + "name": "", + "id": "6c2113e1-e56c-48ed-a189-a03606741fe1", + "path": "/a", + "interactions": "", + "processors": "", + "groups": "", + "action": "New action", + "isComposite": false, + "isPartOfComposite": false + } + ] + }, + { + "name": "Test2", + "id": "6eed48e7-aef6-4694-aa92-669d0d36afe5", + "actions": [ + { + "name": "S", + "type": "Button", + "id": "49cf2b64-d30e-41bb-a188-86cf2550f538", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false + } + ], + "bindings": [ + { + "name": "", + "id": "0264a222-b88d-459e-b67a-0ba6195f60c5", + "path": "/s", + "interactions": "", + "processors": "", + "groups": "", + "action": "S", + "isComposite": false, + "isPartOfComposite": false + } + ] + } + ], + "controlSchemes": [ + { + "name": "Keyboard&Mouse", + "bindingGroup": "Keyboard&Mouse", + "devices": [ + { + "devicePath": "", + "isOptional": false, + "isOR": false + }, + { + "devicePath": "", + "isOptional": false, + "isOR": false + } + ] + }, + { + "name": "Gamepad", + "bindingGroup": "Gamepad", + "devices": [ + { + "devicePath": "", + "isOptional": false, + "isOR": false + } + ] + }, + { + "name": "Touch", + "bindingGroup": "Touch", + "devices": [ + { + "devicePath": "", + "isOptional": false, + "isOR": false + } + ] + }, + { + "name": "Joystick", + "bindingGroup": "Joystick", + "devices": [ + { + "devicePath": "", + "isOptional": false, + "isOR": false + } + ] + }, + { + "name": "XR", + "bindingGroup": "XR", + "devices": [ + { + "devicePath": "", + "isOptional": false, + "isOR": false + } + ] + } + ] +} \ No newline at end of file diff --git a/Assets/02.Scripts/BlueWater.inputactions.meta b/Assets/02.Scripts/InputSystem_Actions.inputactions.meta similarity index 89% rename from Assets/02.Scripts/BlueWater.inputactions.meta rename to Assets/02.Scripts/InputSystem_Actions.inputactions.meta index 92bd5a9f8..ffe4c9303 100644 --- a/Assets/02.Scripts/BlueWater.inputactions.meta +++ b/Assets/02.Scripts/InputSystem_Actions.inputactions.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 1a914529d9891324294dd52d8c0e78e0 +guid: 9f38006d23812da49ba6a33f9bc358b9 ScriptedImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/Assets/02.Scripts/NewBlueWater.inputactions b/Assets/02.Scripts/NewBlueWater.inputactions index e9f6baaa4..aae7e8d6f 100644 --- a/Assets/02.Scripts/NewBlueWater.inputactions +++ b/Assets/02.Scripts/NewBlueWater.inputactions @@ -1,6 +1,104 @@ { "name": "NewBlueWater", "maps": [ + { + "name": "Tycoon", + "id": "0f443e63-5820-47dc-a258-14653b45aecc", + "actions": [ + { + "name": "Move", + "type": "Value", + "id": "52dbe09f-4e34-4a14-a772-54f5d5d97787", + "expectedControlType": "Vector2", + "processors": "", + "interactions": "", + "initialStateCheck": true + }, + { + "name": "Interaction", + "type": "Button", + "id": "31e27536-38f7-4c48-ad94-663c23a8c2a8", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false + } + ], + "bindings": [ + { + "name": "WASD", + "id": "7ba13ad7-4d40-46d8-98dc-c6d126a404ad", + "path": "2DVector", + "interactions": "", + "processors": "", + "groups": "", + "action": "Move", + "isComposite": true, + "isPartOfComposite": false + }, + { + "name": "Up", + "id": "f1aed743-0400-4145-915a-070a7223f48a", + "path": "/w", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "Down", + "id": "deba7645-e691-4420-b2d1-ad5cc1f85b6d", + "path": "/s", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "Left", + "id": "0d6dacbc-02d9-4d47-98f0-40889ef33b75", + "path": "/a", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "Right", + "id": "3e1383c7-48f8-4db0-a58e-96acbdcea12d", + "path": "/d", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "", + "id": "8c3121b0-0da8-48fc-9807-9593fdd06e60", + "path": "/e", + "interactions": "", + "processors": "", + "groups": "", + "action": "Interaction", + "isComposite": false, + "isPartOfComposite": false + } + ] + }, + { + "name": "TycoonUi", + "id": "db82013e-4a4f-4ca3-9bce-d562f1186d92", + "actions": [], + "bindings": [] + }, { "name": "Combat", "id": "8fb462d8-4fe0-47b4-9ad0-7bdd6ed8f567", diff --git a/Assets/02.Scripts/PlayerInputKeyManager.cs b/Assets/02.Scripts/PlayerInputKeyManager.cs index 217849880..05811ddb1 100644 --- a/Assets/02.Scripts/PlayerInputKeyManager.cs +++ b/Assets/02.Scripts/PlayerInputKeyManager.cs @@ -6,6 +6,8 @@ namespace BlueWater public enum InputActionMaps { None = 0, + Tycoon, + TycoonUi, Combat, CombatUi, } diff --git a/Assets/02.Scripts/TycoonCameraManager.cs b/Assets/02.Scripts/TycoonCameraManager.cs new file mode 100644 index 000000000..2eacd3bca --- /dev/null +++ b/Assets/02.Scripts/TycoonCameraManager.cs @@ -0,0 +1,151 @@ +using System.Collections; +using BlueWater.Utility; +using Sirenix.OdinInspector; +using Unity.Cinemachine; +using UnityEngine; +using UnityEngine.Rendering; +using UnityEngine.Rendering.Universal; + +namespace BlueWater +{ + public class TycoonCameraManager : Singleton + { + // Components + #region Components + + [Title("카메라")] + [SerializeField] + private Transform _cinemachineCameras; + + [field: SerializeField] + public CinemachineCamera BaseCamera { get; private set; } + + public Camera MainCamera; + + // Variables + private Vignette _vignette; + private Coroutine _lowHpVignetteCoroutine; + + #endregion + + // Unity events + #region Unity events + + protected override void OnAwake() + { + Initialize(); + } + + private void Start() + { + if (!GameManager.Instance) return; + + GameManager.Instance.OnInstantiatePlayer += SetFollow; + } + + private void OnDestroy() + { + if (!GameManager.Instance) return; + + GameManager.Instance.OnInstantiatePlayer -= SetFollow; + } + + #endregion + + // Initialize methods + #region Initialize methods + + [Button("셋팅 초기화")] + private void Initialize() + { + _cinemachineCameras = GameObject.Find("CinemachineCameras").transform; + BaseCamera = _cinemachineCameras.Find("BaseCamera").GetComponent(); + + BaseCamera.Priority = 1; + + MainCamera = Camera.main; + + _vignette = GetEffect(); + _vignette.active = false; + } + + #endregion + + // Methods + #region Methods + + public void SetFollow(Transform target) + { + BaseCamera.Follow = target; + } + + // public void SetFollowAndLookAt(Transform target) + // { + // BaseCombatCamera.Follow = target; + // BaseCombatCamera.LookAt = target; + // } + + #endregion + + // PostProcessing + #region PostProcessing + + public void ToggleEffect(bool value) where T : VolumeComponent + { + var effect = GetEffect(); + if (effect == null) + { + print(typeof(T) + "효과가 없습니다."); + return; + } + effect.active = value; + } + + private T GetEffect() where T : VolumeComponent + { + var postProcessVolume = FindAnyObjectByType(); + if (postProcessVolume == null) + { + print("Volume 컴포넌트를 가진 오브젝트가 없습니다."); + return null; + } + postProcessVolume.profile.TryGet(out T effect); + return effect; + } + + public void LowHpVignette() + { + _lowHpVignetteCoroutine ??= StartCoroutine(LowHpVignetteCoroutine()); + } + + public void DefaultHpVignette() + { + Utils.EndUniqueCoroutine(this, ref _lowHpVignetteCoroutine); + _vignette.active = false; + } + + private IEnumerator LowHpVignetteCoroutine() + { + var startValue = 0.2f; + var endValue = 0.3f; + var time = 0f; + + _vignette.intensity.value = startValue; + _vignette.active = true; + + while (true) + { + time += Time.deltaTime * 2f; + _vignette.intensity.value = Mathf.Lerp(startValue, endValue, time); + if (time >= 1f) + { + (startValue, endValue) = (endValue, startValue); + time = 0f; + } + yield return null; + } + } + + #endregion + } +} \ No newline at end of file diff --git a/Assets/02.Scripts/TycoonCameraManager.cs.meta b/Assets/02.Scripts/TycoonCameraManager.cs.meta new file mode 100644 index 000000000..30f097f51 --- /dev/null +++ b/Assets/02.Scripts/TycoonCameraManager.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: a856a42a0bf4a7444a3efb5466fc1d4c