레스토랑 플레이어 작업 중
This commit is contained in:
parent
8eb72689e6
commit
515c2ea61f
@ -15,7 +15,7 @@ MonoBehaviour:
|
||||
m_DefaultGroup: 30e7f67fe9aaa7849a34c9b6e2bc53ae
|
||||
m_currentHash:
|
||||
serializedVersion: 2
|
||||
Hash: 00000000000000000000000000000000
|
||||
Hash: 7600c443183b1c4f3c9a27d0df106d6a
|
||||
m_OptimizeCatalogSize: 0
|
||||
m_BuildRemoteCatalog: 1
|
||||
m_CatalogRequestsTimeout: 0
|
||||
|
@ -15,6 +15,16 @@ MonoBehaviour:
|
||||
m_GroupName: GoogleSheetSprite_Group
|
||||
m_GUID: 30e7f67fe9aaa7849a34c9b6e2bc53ae
|
||||
m_SerializeEntries:
|
||||
- m_GUID: 1f850df0adb104f4ba2a6c097152f6fa
|
||||
m_Address: Sprites
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 6ade463886ca5294685e2c4997a976b7
|
||||
m_Address: Assets/_Datas/Addressables/Barrel.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: e15933f76da90e742866563b5cd9e45f
|
||||
m_Address: Gold
|
||||
m_ReadOnly: 0
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "DDD_InputSystem",
|
||||
"maps": [
|
||||
{
|
||||
"name": "Tycoon",
|
||||
"name": "Restaurant",
|
||||
"id": "df70fa95-8a34-4494-b137-73ab6b9c7d37",
|
||||
"actions": [
|
||||
{
|
||||
@ -14,20 +14,20 @@
|
||||
"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",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Dash",
|
||||
"type": "Button",
|
||||
"id": "f1e71b7e-271b-4382-876a-260ea451296a",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
@ -36,55 +36,10 @@
|
||||
"name": "Interact",
|
||||
"type": "Button",
|
||||
"id": "852140f2-7766-474d-8707-702459ba45f3",
|
||||
"expectedControlType": "Button",
|
||||
"expectedControlType": "",
|
||||
"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": [
|
||||
@ -220,39 +175,6 @@
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "c1f7a91b-d0fd-4a62-997e-7fb9b69bf235",
|
||||
"path": "<Gamepad>/rightStick",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Gamepad",
|
||||
"action": "Look",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "8c8e490b-c610-4785-884f-f04217b23ca4",
|
||||
"path": "<Pointer>/delta",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse;Touch",
|
||||
"action": "Look",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "3e5f5442-8668-4b27-a940-df99bad7e831",
|
||||
"path": "<Joystick>/{Hatswitch}",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Joystick",
|
||||
"action": "Look",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "143bb1cd-cc10-4eca-a2f0-a3664166fe91",
|
||||
@ -321,111 +243,12 @@
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "cbac6039-9c09-46a1-b5f2-4e5124ccb5ed",
|
||||
"path": "<Keyboard>/2",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard&Mouse",
|
||||
"action": "Next",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "e15ca19d-e649-4852-97d5-7fe8ccc44e94",
|
||||
"path": "<Gamepad>/dpad/right",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Next",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "f2e9ba44-c423-42a7-ad56-f20975884794",
|
||||
"path": "<Keyboard>/leftShift",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard&Mouse",
|
||||
"action": "Sprint",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "8cbb2f4b-a784-49cc-8d5e-c010b8c7f4e6",
|
||||
"path": "<Gamepad>/leftStickPress",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Sprint",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "d8bf24bf-3f2f-4160-a97c-38ec1eb520ba",
|
||||
"path": "<XRController>/trigger",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "XR",
|
||||
"action": "Sprint",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "eb40bb66-4559-4dfa-9a2f-820438abb426",
|
||||
"id": "b89059c5-3b5d-4c6f-a88c-a0de4e849f9a",
|
||||
"path": "<Keyboard>/space",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard&Mouse",
|
||||
"action": "Jump",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "daba33a1-ad0c-4742-a909-43ad1cdfbeb6",
|
||||
"path": "<Gamepad>/buttonSouth",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Jump",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "603f3daf-40bd-4854-8724-93e8017f59e3",
|
||||
"path": "<XRController>/secondaryButton",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "XR",
|
||||
"action": "Jump",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "1534dc16-a6aa-499d-9c3a-22b47347b52a",
|
||||
"path": "<Keyboard>/1",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard&Mouse",
|
||||
"action": "Previous",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "25060bbd-a3a6-476e-8fba-45ae484aad05",
|
||||
"path": "<Gamepad>/dpad/left",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Previous",
|
||||
"action": "Dash",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
@ -450,33 +273,11 @@
|
||||
"action": "Interact",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "4f4649ac-64a8-4a73-af11-b3faef356a4d",
|
||||
"path": "<Gamepad>/buttonEast",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Crouch",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "36e52cba-0905-478e-a818-f4bfcb9f3b9a",
|
||||
"path": "<Keyboard>/c",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard&Mouse",
|
||||
"action": "Crouch",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "UI",
|
||||
"name": "Ui",
|
||||
"id": "272f6d14-89ba-496f-b7ff-215263d3219f",
|
||||
"actions": [
|
||||
{
|
||||
|
@ -263,6 +263,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c837bbd9eecddc04f9c625fa14062a34, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_persistent: 0
|
||||
_fadeTime: 0.5
|
||||
--- !u!1 &7905835
|
||||
GameObject:
|
||||
@ -296,6 +297,82 @@ Transform:
|
||||
- {fileID: 330585546}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &58759709
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 58759710}
|
||||
- component: {fileID: 58759712}
|
||||
- component: {fileID: 58759711}
|
||||
m_Layer: 0
|
||||
m_Name: KeyManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &58759710
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 58759709}
|
||||
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: 1
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1292767722}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &58759711
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 58759709}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 62899f850307741f2a39c98a8b639597, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Actions: {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
m_NotificationBehavior: 0
|
||||
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_NeverAutoSwitchControlSchemes: 0
|
||||
m_DefaultControlScheme:
|
||||
m_DefaultActionMap: Ui
|
||||
m_SplitScreenIndex: -1
|
||||
m_Camera: {fileID: 0}
|
||||
--- !u!114 &58759712
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 58759709}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f3a9c6e7027b3d944ae69e5e7ccc7627, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_persistent: 0
|
||||
--- !u!1 &169147214
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -341,6 +418,8 @@ GameObject:
|
||||
- component: {fileID: 330585545}
|
||||
- component: {fileID: 330585544}
|
||||
- component: {fileID: 330585547}
|
||||
- component: {fileID: 330585548}
|
||||
- component: {fileID: 330585549}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
@ -387,11 +466,11 @@ Camera:
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
near clip plane: 0.01
|
||||
far clip plane: 300
|
||||
field of view: 35
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
orthographic size: 15.39
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
@ -415,8 +494,8 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 330585543}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalRotation: {x: 0.3420201, y: 0, z: 0, w: 0.9396927}
|
||||
m_LocalPosition: {x: 0.93, y: 7.4278755, z: 5.579555}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@ -466,6 +545,51 @@ MonoBehaviour:
|
||||
m_MipBias: 0
|
||||
m_VarianceClampScale: 0.9
|
||||
m_ContrastAdaptiveSharpening: 0
|
||||
--- !u!114 &330585548
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 330585543}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 72ece51f2901e7445ab60da3685d6b5f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
ShowDebugText: 0
|
||||
ShowCameraFrustum: 1
|
||||
IgnoreTimeScale: 0
|
||||
WorldUpOverride: {fileID: 0}
|
||||
ChannelMask: -1
|
||||
UpdateMethod: 2
|
||||
BlendUpdateMethod: 1
|
||||
LensModeOverride:
|
||||
Enabled: 0
|
||||
DefaultMode: 2
|
||||
DefaultBlend:
|
||||
Style: 0
|
||||
Time: 2
|
||||
CustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve: []
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
CustomBlends: {fileID: 0}
|
||||
--- !u!114 &330585549
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 330585543}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f773d163a0ad27f4caa8daae51f62679, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_persistent: 0
|
||||
--- !u!1 &383092896
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -906,6 +1030,7 @@ Transform:
|
||||
m_Children:
|
||||
- {fileID: 1441270165}
|
||||
- {fileID: 383092898}
|
||||
- {fileID: 58759710}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1441270164
|
||||
@ -952,6 +1077,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 965655bbd1b2f224196ab3275ea13a57, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_persistent: 0
|
||||
--- !u!1 &1613575292
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1038,7 +1164,7 @@ GameObject:
|
||||
- component: {fileID: 1740173699}
|
||||
- component: {fileID: 1740173700}
|
||||
m_Layer: 0
|
||||
m_Name: HierachyController
|
||||
m_Name: TitleHierachyController
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@ -1160,7 +1286,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1773158346
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -2278,13 +2278,13 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 948964996}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalRotation: {x: 0.3420201, y: 0, z: 0, w: 0.9396927}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 968554881}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_LocalEulerAnglesHint: {x: 40, y: 0, z: 0}
|
||||
--- !u!114 &948965000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -2442,7 +2442,7 @@ GameObject:
|
||||
- component: {fileID: 968554882}
|
||||
- component: {fileID: 968554884}
|
||||
m_Layer: 0
|
||||
m_Name: Character
|
||||
m_Name: RestaurantPlayer
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@ -2457,7 +2457,7 @@ Transform:
|
||||
m_GameObject: {fileID: 968554876}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -1.484, y: -0, z: -8.994}
|
||||
m_LocalPosition: {x: 0.93, y: -0, z: 13.24}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
@ -2601,7 +2601,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!114 &1015166833
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -2652,7 +2652,7 @@ Canvas:
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 2
|
||||
m_Camera: {fileID: 6008054305725577080}
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
@ -2835,6 +2835,63 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 04cb72fe661fd534b950283199ac4a83, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &1041959414
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1041959416}
|
||||
- component: {fileID: 1041959415}
|
||||
m_Layer: 0
|
||||
m_Name: RestaurantHierachyController
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1041959415
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1041959414}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 848a85510b808ee4994e553f35ca73bd, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Rules:
|
||||
- Type: 0
|
||||
Name:
|
||||
GameObject: {fileID: 1041959414}
|
||||
Ordinal: 0
|
||||
Priority: 0
|
||||
IconType: 125250
|
||||
IconTexture: {fileID: 0}
|
||||
IsIconRecursive: 0
|
||||
BackgroundType: 1000
|
||||
BackgroundTexture: {fileID: 0}
|
||||
IsBackgroundRecursive: 0
|
||||
IsHidden: 0
|
||||
--- !u!4 &1041959416
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1041959414}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1049193468
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -3183,83 +3240,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 04cb72fe661fd534b950283199ac4a83, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &1221676610
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1221676613}
|
||||
- component: {fileID: 1221676612}
|
||||
- component: {fileID: 1221676611}
|
||||
m_Layer: 0
|
||||
m_Name: System
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1221676611
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1221676610}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f3a9c6e7027b3d944ae69e5e7ccc7627, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_persistent: 0
|
||||
_currentPlayerInput: {fileID: 0}
|
||||
--- !u!114 &1221676612
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1221676610}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 62899f850307741f2a39c98a8b639597, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Actions: {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
m_NotificationBehavior: 0
|
||||
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_NeverAutoSwitchControlSchemes: 0
|
||||
m_DefaultControlScheme:
|
||||
m_DefaultActionMap: Tycoon
|
||||
m_SplitScreenIndex: -1
|
||||
m_Camera: {fileID: 0}
|
||||
--- !u!4 &1221676613
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1221676610}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1226747300
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -7895,134 +7875,12 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 5280945432206803416}
|
||||
m_Layer: 0
|
||||
m_Name: CinemachineCameras
|
||||
m_Name: RestaurantCameras
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1476729262746771376
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7727113593175498124}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!4 &1849900422469267858
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5574617127778367239}
|
||||
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: 2423743769297286737}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &2197148195583396473
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7727113593175498124}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!4 &2423743769297286737
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7727113593175498124}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.3420201, y: 0, z: 0, w: 0.9396927}
|
||||
m_LocalPosition: {x: -1.484, y: 7.427876, z: -16.654446}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1849900422469267858}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 9.569, y: 87.98, z: 0}
|
||||
--- !u!81 &2452097276704759518
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7727113593175498124}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &2948334477606565161
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5574617127778367239}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 4
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.01
|
||||
far clip plane: 300
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 32
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 0
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!124 &2987331736234910793
|
||||
Behaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7727113593175498124}
|
||||
m_Enabled: 1
|
||||
--- !u!1 &3015334612608266903
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -8038,44 +7896,12 @@ GameObject:
|
||||
- component: {fileID: 6463147863076644390}
|
||||
- component: {fileID: 3956599978295396428}
|
||||
m_Layer: 0
|
||||
m_Name: BaseCamera
|
||||
m_Name: BaseCam
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &3221727036895132327
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7727113593175498124}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 72ece51f2901e7445ab60da3685d6b5f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
ShowDebugText: 0
|
||||
ShowCameraFrustum: 1
|
||||
IgnoreTimeScale: 0
|
||||
WorldUpOverride: {fileID: 0}
|
||||
ChannelMask: -1
|
||||
UpdateMethod: 0
|
||||
BlendUpdateMethod: 1
|
||||
LensModeOverride:
|
||||
Enabled: 1
|
||||
DefaultMode: 2
|
||||
DefaultBlend:
|
||||
Style: 6
|
||||
Time: 1
|
||||
CustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve: []
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
CustomBlends: {fileID: 0}
|
||||
--- !u!4 &3417753514960441240
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -8085,7 +7911,7 @@ Transform:
|
||||
m_GameObject: {fileID: 3015334612608266903}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.3420201, y: 0, z: 0, w: 0.9396927}
|
||||
m_LocalPosition: {x: -2.28439, y: 7.394226, z: -8.904446}
|
||||
m_LocalPosition: {x: 0.93, y: 7.4278755, z: 5.579555}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@ -8121,57 +7947,13 @@ MonoBehaviour:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3015334612608266903}
|
||||
m_Enabled: 1
|
||||
m_Enabled: 0
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4d75924d76b05344aa410607bc57db98, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
BoundingVolume: {fileID: 0}
|
||||
SlowingDistance: 0
|
||||
--- !u!114 &4486147805964953134
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7727113593175498124}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_RenderShadows: 1
|
||||
m_RequiresDepthTextureOption: 2
|
||||
m_RequiresOpaqueTextureOption: 2
|
||||
m_CameraType: 0
|
||||
m_Cameras: []
|
||||
m_RendererIndex: -1
|
||||
m_VolumeLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 8
|
||||
m_VolumeTrigger: {fileID: 0}
|
||||
m_VolumeFrameworkUpdateModeOption: 2
|
||||
m_RenderPostProcessing: 1
|
||||
m_Antialiasing: 0
|
||||
m_AntialiasingQuality: 2
|
||||
m_StopNaN: 0
|
||||
m_Dithering: 0
|
||||
m_ClearDepth: 1
|
||||
m_AllowXRRendering: 1
|
||||
m_AllowHDROutput: 1
|
||||
m_UseScreenCoordOverride: 0
|
||||
m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_RequiresDepthTexture: 0
|
||||
m_RequiresColorTexture: 0
|
||||
m_Version: 2
|
||||
m_TaaSettings:
|
||||
m_Quality: 3
|
||||
m_FrameInfluence: 0.1
|
||||
m_JitterScale: 1
|
||||
m_MipBias: 0
|
||||
m_VarianceClampScale: 0.9
|
||||
m_ContrastAdaptiveSharpening: 0
|
||||
--- !u!114 &5019153103791118558
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -8212,82 +7994,13 @@ Transform:
|
||||
m_GameObject: {fileID: 258753385837326235}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0.80039, y: 0.03365, z: -7.75}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 3417753514960441240}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &5574617127778367239
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1849900422469267858}
|
||||
- component: {fileID: 2948334477606565161}
|
||||
- component: {fileID: 6507771935217045067}
|
||||
m_Layer: 0
|
||||
m_Name: UiCamera
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!20 &6008054305725577080
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7727113593175498124}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 2
|
||||
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.01
|
||||
far clip plane: 300
|
||||
field of view: 35
|
||||
orthographic: 0
|
||||
orthographic size: 15.39
|
||||
m_Depth: 1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 2148138967
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 0
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!114 &6081101986367351618
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -8384,81 +8097,13 @@ MonoBehaviour:
|
||||
DissipationDistance: 100
|
||||
PropagationSpeed: 343
|
||||
DefaultVelocity: {x: 0, y: -1, z: 0}
|
||||
--- !u!114 &6507771935217045067
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5574617127778367239}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_RenderShadows: 1
|
||||
m_RequiresDepthTextureOption: 2
|
||||
m_RequiresOpaqueTextureOption: 2
|
||||
m_CameraType: 1
|
||||
m_Cameras: []
|
||||
m_RendererIndex: -1
|
||||
m_VolumeLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 1
|
||||
m_VolumeTrigger: {fileID: 0}
|
||||
m_VolumeFrameworkUpdateModeOption: 2
|
||||
m_RenderPostProcessing: 0
|
||||
m_Antialiasing: 0
|
||||
m_AntialiasingQuality: 2
|
||||
m_StopNaN: 0
|
||||
m_Dithering: 0
|
||||
m_ClearDepth: 1
|
||||
m_AllowXRRendering: 1
|
||||
m_AllowHDROutput: 1
|
||||
m_UseScreenCoordOverride: 0
|
||||
m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_RequiresDepthTexture: 0
|
||||
m_RequiresColorTexture: 0
|
||||
m_Version: 2
|
||||
m_TaaSettings:
|
||||
m_Quality: 3
|
||||
m_FrameInfluence: 0.1
|
||||
m_JitterScale: 1
|
||||
m_MipBias: 0
|
||||
m_VarianceClampScale: 0.9
|
||||
m_ContrastAdaptiveSharpening: 0
|
||||
--- !u!1 &7727113593175498124
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2423743769297286737}
|
||||
- component: {fileID: 6008054305725577080}
|
||||
- component: {fileID: 2987331736234910793}
|
||||
- component: {fileID: 2452097276704759518}
|
||||
- component: {fileID: 4486147805964953134}
|
||||
- component: {fileID: 3221727036895132327}
|
||||
- component: {fileID: 2197148195583396473}
|
||||
- component: {fileID: 1476729262746771376}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 1041959416}
|
||||
- {fileID: 5280945432206803416}
|
||||
- {fileID: 2423743769297286737}
|
||||
- {fileID: 968554881}
|
||||
- {fileID: 1221676613}
|
||||
- {fileID: 121938434}
|
||||
- {fileID: 1785845839}
|
||||
- {fileID: 788164723}
|
||||
|
8
Assets/_Datas/02.Scripts/Audio.meta
Normal file
8
Assets/_Datas/02.Scripts/Audio.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f40845c9bd1bb6440aa3bf49364229a6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
248
Assets/_Datas/02.Scripts/Audio/AudioManager.cs
Normal file
248
Assets/_Datas/02.Scripts/Audio/AudioManager.cs
Normal file
@ -0,0 +1,248 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Audio;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
[Serializable]
|
||||
public class SfxPitch
|
||||
{
|
||||
[field: SerializeField]
|
||||
public bool IsIgnoreTimeScale { get; set; }
|
||||
|
||||
[field: SerializeField]
|
||||
public float PitchValue { get; set; }
|
||||
|
||||
public SfxPitch(bool isIgnoreTimeScale, float pitchValue)
|
||||
{
|
||||
IsIgnoreTimeScale = isIgnoreTimeScale;
|
||||
PitchValue = pitchValue;
|
||||
}
|
||||
}
|
||||
|
||||
public class AudioManager : Singleton<AudioManager>
|
||||
{
|
||||
[Title("오디오 데이터")]
|
||||
[SerializeField]
|
||||
private BgmDataSo _bgmDataSo;
|
||||
|
||||
[SerializeField]
|
||||
private SfxDataSo _sfxDataSo;
|
||||
|
||||
[SerializeField]
|
||||
private int _sfxChannelCount = 32;
|
||||
|
||||
[Title("오디오 믹서")]
|
||||
[SerializeField]
|
||||
private AudioMixer _audioMixer;
|
||||
|
||||
[SerializeField]
|
||||
private AudioMixerGroup _masterMixerGroup;
|
||||
|
||||
[SerializeField]
|
||||
private AudioMixerGroup _bgmMixerGroup;
|
||||
|
||||
[SerializeField]
|
||||
private AudioMixerGroup _sfxMixerGroup;
|
||||
|
||||
[Title("중복 사운드 처리")]
|
||||
[SerializeField, Range(0f, 1f)]
|
||||
private float _sfxMinInterval = 0.09f;
|
||||
|
||||
private Dictionary<string, AudioClip> _bgmDictionary;
|
||||
private Dictionary<string, AudioClip> _sfxDictionary;
|
||||
private Dictionary<AudioSource, SfxPitch> _sfxPitchDictionary;
|
||||
private Dictionary<string, float> _sfxPlayTimeDictionary;
|
||||
|
||||
private AudioSource _bgmAudioSource;
|
||||
|
||||
protected override void OnAwake()
|
||||
{
|
||||
InitializeDictionary();
|
||||
InitializeComponents();
|
||||
|
||||
SceneManager.sceneLoaded += OnSceneLoaded;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
SceneManager.sceneLoaded -= OnSceneLoaded;
|
||||
}
|
||||
|
||||
private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
|
||||
{
|
||||
StopBgm();
|
||||
StopSfxAll();
|
||||
}
|
||||
|
||||
private void InitializeDictionary()
|
||||
{
|
||||
_bgmDictionary = new Dictionary<string, AudioClip>(_bgmDataSo.BgmDataList.Count);
|
||||
foreach (var element in _bgmDataSo.BgmDataList)
|
||||
{
|
||||
_bgmDictionary.Add(element.BgmName, element.Clip);
|
||||
}
|
||||
|
||||
_sfxDictionary = new Dictionary<string, AudioClip>(_sfxDataSo.SfxDataList.Count);
|
||||
foreach (var element in _sfxDataSo.SfxDataList)
|
||||
{
|
||||
_sfxDictionary.Add(element.SfxName, element.Clip);
|
||||
}
|
||||
|
||||
_sfxPlayTimeDictionary = new Dictionary<string, float>(_sfxDataSo.SfxDataList.Count);
|
||||
}
|
||||
|
||||
private void InitializeComponents()
|
||||
{
|
||||
_bgmAudioSource = gameObject.AddComponent<AudioSource>();
|
||||
_bgmAudioSource.outputAudioMixerGroup = _bgmMixerGroup;
|
||||
_bgmAudioSource.loop = true;
|
||||
|
||||
_sfxPitchDictionary = new Dictionary<AudioSource, SfxPitch>(_sfxChannelCount);
|
||||
for (var i = 0; i < _sfxChannelCount; i++)
|
||||
{
|
||||
var sfxAudioSource = gameObject.AddComponent<AudioSource>();
|
||||
sfxAudioSource.outputAudioMixerGroup = _sfxMixerGroup;
|
||||
sfxAudioSource.loop = false;
|
||||
_sfxPitchDictionary[sfxAudioSource] = new SfxPitch(false, sfxAudioSource.pitch);
|
||||
}
|
||||
}
|
||||
|
||||
public void PlayBgm(string bgmName)
|
||||
{
|
||||
if (_bgmDictionary.TryGetValue(bgmName, out var value))
|
||||
{
|
||||
_bgmAudioSource.clip = value;
|
||||
_bgmAudioSource.Play();
|
||||
}
|
||||
else
|
||||
{
|
||||
print("Bgm not found: " + bgmName);
|
||||
}
|
||||
}
|
||||
|
||||
public void StopBgm()
|
||||
{
|
||||
_bgmAudioSource.Stop();
|
||||
}
|
||||
|
||||
public void PlaySfx(string sfxName, bool loop = false, bool ignoreTimeScale = false, float? duration = null)
|
||||
{
|
||||
if (_sfxDictionary.TryGetValue(sfxName, out var value))
|
||||
{
|
||||
float currentTime = ignoreTimeScale ? Time.unscaledTime : Time.time;
|
||||
|
||||
if (_sfxPlayTimeDictionary.TryGetValue(sfxName, out var lastPlayTime))
|
||||
{
|
||||
if (currentTime - lastPlayTime < _sfxMinInterval)
|
||||
{
|
||||
return; // 최소 간격 조건 미충족 시 재생하지 않음
|
||||
}
|
||||
}
|
||||
var availableSfxAudioSource = GetAvailableSfxAudioSource();
|
||||
availableSfxAudioSource.clip = value;
|
||||
availableSfxAudioSource.loop = loop;
|
||||
|
||||
if (ignoreTimeScale)
|
||||
{
|
||||
_sfxPitchDictionary[availableSfxAudioSource] = new SfxPitch(true, 1f);
|
||||
availableSfxAudioSource.pitch = 1f;
|
||||
}
|
||||
else
|
||||
{
|
||||
float pitch = duration.HasValue ? value.length / duration.Value : 1f;
|
||||
_sfxPitchDictionary[availableSfxAudioSource] = new SfxPitch(false, pitch);
|
||||
availableSfxAudioSource.pitch = _sfxPitchDictionary[availableSfxAudioSource].PitchValue * Time.timeScale;
|
||||
}
|
||||
|
||||
availableSfxAudioSource.Play();
|
||||
|
||||
_sfxPlayTimeDictionary[sfxName] = currentTime;
|
||||
}
|
||||
else
|
||||
{
|
||||
print("Sfx not found: " + sfxName);
|
||||
}
|
||||
}
|
||||
|
||||
public void StopSfx(string sfxName)
|
||||
{
|
||||
if (_sfxDictionary.TryGetValue(sfxName, out var clip))
|
||||
{
|
||||
foreach (var element in _sfxPitchDictionary.Keys)
|
||||
{
|
||||
if (element.clip == clip && element.isPlaying)
|
||||
{
|
||||
element.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("Sfx not found: " + sfxName);
|
||||
}
|
||||
}
|
||||
|
||||
public void StopSfxAll()
|
||||
{
|
||||
foreach (var element in _sfxPitchDictionary.Keys)
|
||||
{
|
||||
if (element.isPlaying)
|
||||
{
|
||||
element.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private AudioSource GetAvailableSfxAudioSource()
|
||||
{
|
||||
foreach (var element in _sfxPitchDictionary.Keys)
|
||||
{
|
||||
if (!element.isPlaying)
|
||||
{
|
||||
return element;
|
||||
}
|
||||
}
|
||||
|
||||
// 모든 AudioSource가 사용 중이면 첫 번째 AudioSource를 재사용
|
||||
using var enumerator = _sfxPitchDictionary.Keys.GetEnumerator();
|
||||
enumerator.MoveNext();
|
||||
return enumerator.Current;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 0.0001 ~ 1값
|
||||
/// </summary>
|
||||
/// <param name="volume"></param>
|
||||
public void SetMasterVolume(float volume)
|
||||
{
|
||||
var newVolume = Mathf.Log10(volume) * 20f;
|
||||
_audioMixer.SetFloat("Master", newVolume);
|
||||
}
|
||||
|
||||
public void SetBgmVolume(float volume)
|
||||
{
|
||||
var newVolume = Mathf.Log10(volume) * 20f;
|
||||
_audioMixer.SetFloat("Bgm", newVolume);
|
||||
}
|
||||
|
||||
public void SetSfxVolume(float volume)
|
||||
{
|
||||
var newVolume = Mathf.Log10(volume) * 20f;
|
||||
_audioMixer.SetFloat("Sfx", newVolume);
|
||||
}
|
||||
|
||||
public void SetPitchSfxAll(float pitch)
|
||||
{
|
||||
foreach (var element in _sfxPitchDictionary)
|
||||
{
|
||||
if (element.Value.IsIgnoreTimeScale) continue;
|
||||
|
||||
element.Key.pitch = element.Value.PitchValue * pitch;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
2
Assets/_Datas/02.Scripts/Audio/AudioManager.cs.meta
Normal file
2
Assets/_Datas/02.Scripts/Audio/AudioManager.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 54b5aaa88dea1da42ae7d417eba96d42
|
12
Assets/_Datas/02.Scripts/Audio/BgmData.cs
Normal file
12
Assets/_Datas/02.Scripts/Audio/BgmData.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
[Serializable]
|
||||
public class BgmData
|
||||
{
|
||||
[field: SerializeField] public string BgmName { get; private set; }
|
||||
[field: SerializeField] public AudioClip Clip { get; private set; }
|
||||
}
|
||||
}
|
2
Assets/_Datas/02.Scripts/Audio/BgmData.cs.meta
Normal file
2
Assets/_Datas/02.Scripts/Audio/BgmData.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6519c845d8f266247aab94e71c36b7e7
|
11
Assets/_Datas/02.Scripts/Audio/BgmDataSo.cs
Normal file
11
Assets/_Datas/02.Scripts/Audio/BgmDataSo.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
[CreateAssetMenu(fileName = "BgmData", menuName = "ScriptableObjects/Audio/BgmData")]
|
||||
public class BgmDataSo : ScriptableObject
|
||||
{
|
||||
[field: SerializeField] public List<BgmData> BgmDataList { get; private set; } = new();
|
||||
}
|
||||
}
|
2
Assets/_Datas/02.Scripts/Audio/BgmDataSo.cs.meta
Normal file
2
Assets/_Datas/02.Scripts/Audio/BgmDataSo.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0529eda213efaa9429a7095d9516f811
|
12
Assets/_Datas/02.Scripts/Audio/SfxData.cs
Normal file
12
Assets/_Datas/02.Scripts/Audio/SfxData.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
[Serializable]
|
||||
public class SfxData
|
||||
{
|
||||
[field: SerializeField] public string SfxName { get; private set; }
|
||||
[field: SerializeField] public AudioClip Clip { get; private set; }
|
||||
}
|
||||
}
|
2
Assets/_Datas/02.Scripts/Audio/SfxData.cs.meta
Normal file
2
Assets/_Datas/02.Scripts/Audio/SfxData.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 20d384fd7f96d7b4292ed1f977a83612
|
11
Assets/_Datas/02.Scripts/Audio/SfxDataSo.cs
Normal file
11
Assets/_Datas/02.Scripts/Audio/SfxDataSo.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
[CreateAssetMenu(fileName = "SfxData", menuName = "ScriptableObjects/Audio/SfxData")]
|
||||
public class SfxDataSo : ScriptableObject
|
||||
{
|
||||
[field: SerializeField] public List<SfxData> SfxDataList { get; private set; } = new();
|
||||
}
|
||||
}
|
2
Assets/_Datas/02.Scripts/Audio/SfxDataSo.cs.meta
Normal file
2
Assets/_Datas/02.Scripts/Audio/SfxDataSo.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4683062e9e9ee89418800940508d474c
|
83
Assets/_Datas/02.Scripts/Controllers/CameraManager.cs
Normal file
83
Assets/_Datas/02.Scripts/Controllers/CameraManager.cs
Normal file
@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Sirenix.OdinInspector;
|
||||
using Unity.Cinemachine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
public enum CameraType
|
||||
{
|
||||
BaseCam = 0,
|
||||
}
|
||||
|
||||
public class CameraManager : Singleton<CameraManager>
|
||||
{
|
||||
[ShowInInspector]
|
||||
private Dictionary<CameraType, CinemachineCamera> _cameraDict;
|
||||
|
||||
private CinemachineBrain _cinemachineBrain;
|
||||
|
||||
protected override void OnAwake()
|
||||
{
|
||||
base.OnAwake();
|
||||
|
||||
_cinemachineBrain = GetComponent<CinemachineBrain>();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
SceneManager.sceneLoaded += OnSceneLoaded;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
SceneManager.sceneLoaded -= OnSceneLoaded;
|
||||
}
|
||||
|
||||
private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
|
||||
{
|
||||
_ = RegisterCinemachineCamerasAsync(scene);
|
||||
}
|
||||
|
||||
private async Task RegisterCinemachineCamerasAsync(Scene scene)
|
||||
{
|
||||
// 씬 로딩 직후는 Hierarchy 반영이 완료되지 않았을 수 있음
|
||||
await Task.Yield(); // 다음 프레임까지 대기
|
||||
|
||||
var foundCams = FindObjectsByType<CinemachineCamera>(FindObjectsInactive.Include, FindObjectsSortMode.None);
|
||||
_cameraDict.Clear();
|
||||
|
||||
foreach (var cam in foundCams)
|
||||
{
|
||||
if (Enum.TryParse<CameraType>(cam.name, out var type))
|
||||
{
|
||||
if (!_cameraDict.TryAdd(type, cam))
|
||||
Debug.LogWarning($"중복된 CameraType: {type}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"Enum에 없는 카메라 이름: {cam.name}");
|
||||
}
|
||||
}
|
||||
|
||||
Debug.Log("[CameraManager] 카메라 등록 완료");
|
||||
|
||||
if (scene.name == "01.Restaurant")
|
||||
{
|
||||
SwitchCamera(CameraType.BaseCam);
|
||||
}
|
||||
}
|
||||
|
||||
public void SwitchCamera(CameraType cameraType, CinemachineBlendDefinition.Styles blendStyle = CinemachineBlendDefinition.Styles.Cut, float blendDuration = 1f)
|
||||
{
|
||||
_cinemachineBrain.DefaultBlend = new CinemachineBlendDefinition(blendStyle, blendDuration);
|
||||
foreach (var pair in _cameraDict)
|
||||
{
|
||||
pair.Value.Priority = (pair.Key == cameraType) ? 10 : 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f773d163a0ad27f4caa8daae51f62679
|
@ -11,16 +11,9 @@ public enum SceneName
|
||||
Restaurant = 1
|
||||
}
|
||||
|
||||
public class GameManager : MonoBehaviour
|
||||
public class GameManager : Singleton<GameManager>
|
||||
{
|
||||
private UiManager _uiManager;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_uiManager = FindAnyObjectByType<UiManager>();
|
||||
}
|
||||
|
||||
public async void ChangeScene(SceneName sceneName)
|
||||
public async Task ChangeScene(SceneName sceneName)
|
||||
{
|
||||
string previousSceneName = SceneManager.GetActiveScene().name;
|
||||
string changeSceneName;
|
||||
@ -37,17 +30,17 @@ public async void ChangeScene(SceneName sceneName)
|
||||
throw new ArgumentOutOfRangeException(nameof(sceneName), sceneName, null);
|
||||
}
|
||||
|
||||
await _uiManager.FadeIn();
|
||||
await UiManager.Instance.FadeIn();
|
||||
|
||||
AsyncOperation loadSceneAsync = SceneManager.LoadSceneAsync(changeSceneName, LoadSceneMode.Additive);
|
||||
while (loadSceneAsync is { isDone: false })
|
||||
await Task.Yield();
|
||||
|
||||
_uiManager.ChangeScene(previousSceneName, changeSceneName);
|
||||
UiManager.Instance.ChangeScene(previousSceneName, changeSceneName);
|
||||
|
||||
await Task.Delay(1000);
|
||||
|
||||
await _uiManager.FadeOut();
|
||||
await UiManager.Instance.FadeOut();
|
||||
|
||||
Debug.Log($"씬 로드 및 전환 완료: {changeSceneName}");
|
||||
}
|
||||
@ -55,7 +48,7 @@ public async void ChangeScene(SceneName sceneName)
|
||||
public void ChangeSceneByIndex(int index)
|
||||
{
|
||||
var sceneEnum = (SceneName)index;
|
||||
ChangeScene(sceneEnum);
|
||||
_ = ChangeScene(sceneEnum);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,120 +1,71 @@
|
||||
using System.Threading.Tasks;
|
||||
using DDD;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public enum InputActionMaps
|
||||
namespace DDD
|
||||
{
|
||||
public enum InputActionMaps
|
||||
{
|
||||
None = 0,
|
||||
UI = 1,
|
||||
Tycoon = 2,
|
||||
TycoonUi = 3,
|
||||
CombatTitle = 4,
|
||||
Combat = 5,
|
||||
CombatUi = 6
|
||||
}
|
||||
|
||||
public static class UiActions
|
||||
{
|
||||
public const string Navigate = "Navigate";
|
||||
Ui = 1,
|
||||
Restaurant = 2,
|
||||
}
|
||||
|
||||
public static class TycoonActions
|
||||
public static class RestaurantActions
|
||||
{
|
||||
public const string Move = "Move";
|
||||
public const string Dash = "Dash";
|
||||
public const string Interaction = "Interaction";
|
||||
public const string DevelopKey01 = "DevelopKey01";
|
||||
public const string OpenManualBook = "OpenManualBook";
|
||||
public const string ZoomOut = "ZoomOut";
|
||||
public const string ZoomIn = "ZoomIn";
|
||||
public const string Options = "Options";
|
||||
public const string Interact = "Interact";
|
||||
}
|
||||
|
||||
public static class TycoonUiActions
|
||||
|
||||
public class KeyManager : Singleton<KeyManager>
|
||||
{
|
||||
public const string Move = "Move";
|
||||
public const string Cancel = "Cancel";
|
||||
public const string PressQ = "PressQ";
|
||||
public const string PressR = "PressR";
|
||||
public const string PressA = "PressA";
|
||||
public const string PressD = "PressD";
|
||||
public const string PressAnyKey = "PressAnyKey";
|
||||
public const string InteractionE = "InteractionE";
|
||||
public const string PressF = "PressF";
|
||||
}
|
||||
|
||||
public class PlayerInputKeyManager : Singleton<PlayerInputKeyManager>
|
||||
{
|
||||
[SerializeField]
|
||||
private PlayerInput _currentPlayerInput;
|
||||
|
||||
public bool IsInitialized { get; private set; }
|
||||
|
||||
protected override void OnAwake()
|
||||
{
|
||||
base.OnAwake();
|
||||
|
||||
_currentPlayerInput = GetComponent<PlayerInput>();
|
||||
}
|
||||
|
||||
private async void Start()
|
||||
private void Start()
|
||||
{
|
||||
await Initialize();
|
||||
|
||||
SceneManager.sceneLoaded += OnSceneLoaded;
|
||||
}
|
||||
|
||||
private async void OnSceneLoaded(Scene scene, LoadSceneMode mode)
|
||||
{
|
||||
await Initialize();
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
SceneManager.sceneLoaded -= OnSceneLoaded;
|
||||
}
|
||||
|
||||
private async Task Initialize()
|
||||
|
||||
private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
|
||||
{
|
||||
IsInitialized = false;
|
||||
await Task.Delay(1000);
|
||||
|
||||
DisableAllActionMaps();
|
||||
string currentSceneName = SceneManager.GetActiveScene().name;
|
||||
|
||||
// if (currentSceneName == SceneName.TycoonTile)
|
||||
// {
|
||||
// SwitchCurrentActionMap(InputActionMaps.TycoonUi);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
SwitchCurrentActionMap(InputActionMaps.Tycoon);
|
||||
// }
|
||||
|
||||
IsInitialized = true;
|
||||
switch (currentSceneName)
|
||||
{
|
||||
case "00.Title":
|
||||
SwitchCurrentActionMap(InputActionMaps.Ui);
|
||||
break;
|
||||
case "01.Restaurant":
|
||||
SwitchCurrentActionMap(InputActionMaps.Restaurant);
|
||||
break;
|
||||
default:
|
||||
throw new System.Exception("Invalid scene name");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 현재 실행되고 있는 PlayerInput을 관리할 수 있게
|
||||
/// PlayerInput 컴포넌트를 받아와서 사용하는 경우에 필수로 호출
|
||||
/// </summary>
|
||||
/// <param name="playerInput"></param>
|
||||
public void SetCurrentPlayerInput(PlayerInput playerInput) => _currentPlayerInput = playerInput;
|
||||
|
||||
private bool IsNullCurrentPlayerInput()
|
||||
{
|
||||
if (_currentPlayerInput && _currentPlayerInput.enabled) return false;
|
||||
|
||||
|
||||
Debug.Log("CurrentPlayerInput가 할당되지 않았습니다.");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public InputAction GetAction(InputActionMaps actionMapName, string actionName)
|
||||
{
|
||||
if (IsNullCurrentPlayerInput()) return null;
|
||||
|
||||
|
||||
var actionMap = _currentPlayerInput.actions.FindActionMap(actionMapName.ToString(), true);
|
||||
if (actionMap == null)
|
||||
{
|
||||
@ -127,9 +78,10 @@ public InputAction GetAction(InputActionMaps actionMapName, string actionName)
|
||||
{
|
||||
Debug.LogError($"Action '{actionName}' not found in Action Map '{actionMapName}'!");
|
||||
}
|
||||
|
||||
return action;
|
||||
}
|
||||
|
||||
|
||||
public string GetBoundKey(InputActionMaps actionMapName, string actionName)
|
||||
{
|
||||
if (IsNullCurrentPlayerInput()) return null;
|
||||
@ -154,7 +106,8 @@ public string GetBoundKey(InputActionMaps actionMapName, string actionName)
|
||||
if (!string.IsNullOrEmpty(binding.path))
|
||||
{
|
||||
// 키 이름만 추출
|
||||
var key = InputControlPath.ToHumanReadableString(binding.path, InputControlPath.HumanReadableStringOptions.OmitDevice);
|
||||
var key = InputControlPath.ToHumanReadableString(binding.path,
|
||||
InputControlPath.HumanReadableStringOptions.OmitDevice);
|
||||
return key;
|
||||
}
|
||||
}
|
||||
@ -162,24 +115,25 @@ public string GetBoundKey(InputActionMaps actionMapName, string actionName)
|
||||
Debug.LogWarning($"No bindings found for action '{actionName}' in Action Map '{actionMapName}'.");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public string GetBoundKey(InputAction inputAction)
|
||||
{
|
||||
if (IsNullCurrentPlayerInput()) return null;
|
||||
|
||||
|
||||
if (inputAction == null)
|
||||
{
|
||||
Debug.LogError($"Action not found'!");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
// 첫 번째 바인딩에서 키 이름 가져오기
|
||||
foreach (var binding in inputAction.bindings)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(binding.path))
|
||||
{
|
||||
// 키 이름만 추출
|
||||
var key = InputControlPath.ToHumanReadableString(binding.path, InputControlPath.HumanReadableStringOptions.OmitDevice);
|
||||
var key = InputControlPath.ToHumanReadableString(binding.path,
|
||||
InputControlPath.HumanReadableStringOptions.OmitDevice);
|
||||
return key;
|
||||
}
|
||||
}
|
||||
@ -194,18 +148,18 @@ public bool IsCurrentActionMap(InputActionMaps inputActionMaps)
|
||||
|
||||
return _currentPlayerInput.currentActionMap.ToString() == inputActionMaps.ToString();
|
||||
}
|
||||
|
||||
|
||||
public void SwitchCurrentActionMap(string inputActionMaps)
|
||||
{
|
||||
if (IsNullCurrentPlayerInput()) return;
|
||||
|
||||
|
||||
_currentPlayerInput.SwitchCurrentActionMap(inputActionMaps);
|
||||
}
|
||||
|
||||
|
||||
public void SwitchCurrentActionMap(InputActionMaps inputActionMaps)
|
||||
{
|
||||
if (IsNullCurrentPlayerInput()) return;
|
||||
|
||||
|
||||
_currentPlayerInput.SwitchCurrentActionMap(inputActionMaps.ToString());
|
||||
}
|
||||
|
||||
@ -222,30 +176,30 @@ public void EnableCurrentPlayerInput()
|
||||
|
||||
_currentPlayerInput.enabled = true;
|
||||
}
|
||||
|
||||
|
||||
public void DisableCurrentPlayerInput()
|
||||
{
|
||||
if (IsNullCurrentPlayerInput()) return;
|
||||
|
||||
_currentPlayerInput.enabled = false;
|
||||
}
|
||||
|
||||
|
||||
public void DisableAllActionMaps()
|
||||
{
|
||||
if (IsNullCurrentPlayerInput()) return;
|
||||
|
||||
|
||||
foreach (var element in _currentPlayerInput.actions.actionMaps)
|
||||
{
|
||||
element.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void DisableAllActionsExcept(string exceptActionName)
|
||||
{
|
||||
if (IsNullCurrentPlayerInput()) return;
|
||||
|
||||
|
||||
var exceptAction = _currentPlayerInput.currentActionMap.FindAction(exceptActionName);
|
||||
|
||||
|
||||
foreach (var action in _currentPlayerInput.currentActionMap.actions)
|
||||
{
|
||||
if (action != exceptAction)
|
||||
@ -258,11 +212,11 @@ public void DisableAllActionsExcept(string exceptActionName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void EnableAllActionsMaps()
|
||||
{
|
||||
if (IsNullCurrentPlayerInput()) return;
|
||||
|
||||
|
||||
foreach (var action in _currentPlayerInput.actions)
|
||||
{
|
||||
action.Enable();
|
||||
@ -286,7 +240,7 @@ public void EnableAction(string actionName)
|
||||
public void DisableAction(string actionName)
|
||||
{
|
||||
if (IsNullCurrentPlayerInput()) return;
|
||||
|
||||
|
||||
var action = _currentPlayerInput.currentActionMap.FindAction(actionName);
|
||||
if (action == null)
|
||||
{
|
||||
@ -296,4 +250,5 @@ public void DisableAction(string actionName)
|
||||
|
||||
action.Disable();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,3 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using DG.Tweening;
|
||||
using Sirenix.OdinInspector;
|
||||
@ -6,7 +5,7 @@
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
public class UiManager : MonoBehaviour
|
||||
public class UiManager : Singleton<UiManager>
|
||||
{
|
||||
[Title("연출")]
|
||||
[SerializeField]
|
||||
@ -20,7 +19,7 @@ public class UiManager : MonoBehaviour
|
||||
private Tween _fadeIn;
|
||||
private Tween _fadeOut;
|
||||
|
||||
private void Awake()
|
||||
protected override void OnAwake()
|
||||
{
|
||||
_titlePanel = transform.Find("TitlePanel").gameObject;
|
||||
|
||||
@ -30,6 +29,8 @@ private void Awake()
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_titlePanel.SetActive(true);
|
||||
|
||||
_fadePanel.SetActive(false);
|
||||
_fadeCanvasGroup.alpha = 0f;
|
||||
|
||||
|
8
Assets/_Datas/02.Scripts/Restaurants.meta
Normal file
8
Assets/_Datas/02.Scripts/Restaurants.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f9d8444159027d447816c0ee19de105f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
236
Assets/_Datas/02.Scripts/Restaurants/RestaurantPlayer.cs
Normal file
236
Assets/_Datas/02.Scripts/Restaurants/RestaurantPlayer.cs
Normal file
@ -0,0 +1,236 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
public class RestaurantPlayer : MonoBehaviour
|
||||
{
|
||||
#region Variables
|
||||
|
||||
private Rigidbody _rigidbody;
|
||||
private Transform _visualLook;
|
||||
|
||||
// Move
|
||||
[SerializeField, Range(1f, 20f), Tooltip("이동 속도")]
|
||||
private float _moveSpeed = 7f;
|
||||
|
||||
[SerializeField]
|
||||
private float _moveSpeedMultiplier = 1f;
|
||||
|
||||
private bool _isMoveEnabled = true;
|
||||
|
||||
private bool _isMoving;
|
||||
|
||||
// Dash
|
||||
[Title("대쉬")]
|
||||
[SerializeField, Range(1f, 50f), Tooltip("대쉬 속도")]
|
||||
private float _dashSpeed = 20f;
|
||||
|
||||
[SerializeField, Range(0.1f, 1f), Tooltip("대쉬 시간")]
|
||||
private float _dashTime = 0.2f;
|
||||
|
||||
[SerializeField, Range(0f, 5f), Tooltip("대쉬 쿨타임")]
|
||||
private float _dashCooldown = 0.5f;
|
||||
|
||||
[SerializeField]
|
||||
private ParticleSystem _dashParticle;
|
||||
|
||||
[Title("사운드")]
|
||||
[SerializeField]
|
||||
private string _walkingSfxName = "TycoonPlayerWalking";
|
||||
|
||||
[SerializeField]
|
||||
private string _dashSfxName = "TycoonPlayerDashing";
|
||||
|
||||
private bool _isDashEnabled = true;
|
||||
private bool _isDashing;
|
||||
private bool _isDashCoolDownActive;
|
||||
|
||||
private Vector3 _inputDirection;
|
||||
|
||||
private Vector3 _currentDirection = Vector3.back;
|
||||
|
||||
private InputAction _moveAction;
|
||||
private InputAction _dashAction;
|
||||
private Coroutine _dashInstance;
|
||||
private float _finalSpeed;
|
||||
|
||||
#endregion
|
||||
|
||||
// Unity events
|
||||
|
||||
#region Unity events
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
InitializeComponents();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_moveAction = KeyManager.Instance.GetAction(InputActionMaps.Restaurant, RestaurantActions.Move);
|
||||
_dashAction = KeyManager.Instance.GetAction(InputActionMaps.Restaurant, RestaurantActions.Dash);
|
||||
|
||||
_moveAction.performed += OnMove;
|
||||
_moveAction.canceled += OnMove;
|
||||
_dashAction.performed += OnDash;
|
||||
}
|
||||
|
||||
public CellManager cellManager;
|
||||
private void Update()
|
||||
{
|
||||
FlipVisualLook();
|
||||
|
||||
//UpdateCell
|
||||
cellManager.SetupCell(transform.position);
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
if (!CanMove()) return;
|
||||
|
||||
Move();
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
_moveAction.performed -= OnMove;
|
||||
_moveAction.canceled -= OnMove;
|
||||
// _dashAction.performed -= OnDash;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
// Initialize Methods
|
||||
|
||||
#region Initialize Methods
|
||||
|
||||
private void InitializeComponents()
|
||||
{
|
||||
_rigidbody = GetComponent<Rigidbody>();
|
||||
_visualLook = transform.Find("VisualLook");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
// Methods
|
||||
|
||||
#region Methods
|
||||
|
||||
// Event methods
|
||||
public void SetCurrentDirection(Vector3 normalDirection)
|
||||
{
|
||||
if (normalDirection == Vector3.zero) return;
|
||||
|
||||
_currentDirection = normalDirection;
|
||||
}
|
||||
|
||||
// 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 void OnMove(InputAction.CallbackContext context)
|
||||
{
|
||||
var movementInput = _moveAction.ReadValue<Vector2>();
|
||||
_inputDirection = new Vector3(movementInput.x, 0, movementInput.y).normalized;
|
||||
}
|
||||
|
||||
public bool CanMove()
|
||||
{
|
||||
return _isMoveEnabled && !_isDashing;
|
||||
}
|
||||
|
||||
public void Move()
|
||||
{
|
||||
SetCurrentDirection(_inputDirection);
|
||||
_isMoving = _inputDirection != Vector3.zero;
|
||||
|
||||
var finalVelocity = _inputDirection * (_moveSpeed * _moveSpeedMultiplier);
|
||||
if (!_rigidbody.isKinematic)
|
||||
{
|
||||
_rigidbody.linearVelocity = finalVelocity;
|
||||
}
|
||||
}
|
||||
|
||||
// Dash
|
||||
public void OnDash(InputAction.CallbackContext context)
|
||||
{
|
||||
if (!CanDash()) return;
|
||||
|
||||
Dash();
|
||||
}
|
||||
|
||||
public bool CanDash()
|
||||
{
|
||||
return _isDashEnabled && !_isDashing && !_isDashCoolDownActive;
|
||||
}
|
||||
|
||||
public void Dash()
|
||||
{
|
||||
Utils.StartUniqueCoroutine(this, ref _dashInstance, DashCoroutine());
|
||||
}
|
||||
|
||||
private IEnumerator DashCoroutine()
|
||||
{
|
||||
_isDashing = true;
|
||||
_isDashCoolDownActive = true;
|
||||
if (_dashParticle)
|
||||
{
|
||||
_dashParticle.Play();
|
||||
}
|
||||
|
||||
AudioManager.Instance.PlaySfx(_dashSfxName);
|
||||
|
||||
var dashDirection = _inputDirection;
|
||||
if (dashDirection == Vector3.zero)
|
||||
{
|
||||
dashDirection = _currentDirection;
|
||||
}
|
||||
|
||||
var elapsedTime = 0f;
|
||||
while (elapsedTime <= _dashTime)
|
||||
{
|
||||
var finalVelocity = dashDirection * _dashSpeed;
|
||||
_rigidbody.linearVelocity = finalVelocity;
|
||||
|
||||
elapsedTime += Time.fixedDeltaTime;
|
||||
yield return new WaitForFixedUpdate();
|
||||
}
|
||||
|
||||
//var newDashCooldown = DashCooldown - TycoonManager.Instance.TycoonStatus.PlayerDashCooldownReduction;
|
||||
EndDash(_dashCooldown);
|
||||
}
|
||||
|
||||
public void EndDash(float dashCooldown = float.PositiveInfinity)
|
||||
{
|
||||
Utils.EndUniqueCoroutine(this, ref _dashInstance);
|
||||
_rigidbody.linearVelocity = Vector3.zero;
|
||||
_isDashing = false;
|
||||
|
||||
if (float.IsPositiveInfinity(dashCooldown))
|
||||
{
|
||||
dashCooldown = _dashCooldown;
|
||||
}
|
||||
|
||||
// TODO : ui 연동
|
||||
//EventManager.InvokeDashCooldown(dashCooldown);
|
||||
StartCoroutine(Utils.CoolDownCoroutine(dashCooldown, () => _isDashCoolDownActive = false));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,5 +1,8 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
@ -41,5 +44,31 @@ public static void MakeFolderFromFilePath(string filePath)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerator CoolDownCoroutine(float waitTime, Action onCooldownComplete = null)
|
||||
{
|
||||
yield return new WaitForSeconds(waitTime);
|
||||
onCooldownComplete?.Invoke();
|
||||
}
|
||||
|
||||
public static void StartUniqueCoroutine(MonoBehaviour owner, ref Coroutine coroutineField, IEnumerator coroutineMethod)
|
||||
{
|
||||
if (coroutineField != null)
|
||||
{
|
||||
owner.StopCoroutine(coroutineField);
|
||||
coroutineField = null;
|
||||
}
|
||||
|
||||
coroutineField = owner.StartCoroutine(coroutineMethod);
|
||||
}
|
||||
|
||||
public static void EndUniqueCoroutine(MonoBehaviour owner, ref Coroutine coroutineField)
|
||||
{
|
||||
if (coroutineField != null)
|
||||
{
|
||||
owner.StopCoroutine(coroutineField);
|
||||
coroutineField = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
121
Assets/_Datas/Addressables/Barrel 1.prefab
Normal file
121
Assets/_Datas/Addressables/Barrel 1.prefab
Normal file
@ -0,0 +1,121 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &4620735149564359356
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 356509076867885997}
|
||||
- component: {fileID: 1457369735750806052}
|
||||
m_Layer: 0
|
||||
m_Name: VisualLook
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &356509076867885997
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4620735149564359356}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.34202015, y: 0, z: 0, w: 0.9396927}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1063298246775673564}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &1457369735750806052
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4620735149564359356}
|
||||
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: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, 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: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 5
|
||||
m_Sprite: {fileID: 21300000, guid: 189d780f1507008429f2cdd1a2b4c9e8, 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!1 &5095514477995875136
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1063298246775673564}
|
||||
m_Layer: 0
|
||||
m_Name: Barrel 1
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1063298246775673564
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5095514477995875136}
|
||||
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: 1
|
||||
m_Children:
|
||||
- {fileID: 356509076867885997}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
7
Assets/_Datas/Addressables/Barrel 1.prefab.meta
Normal file
7
Assets/_Datas/Addressables/Barrel 1.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a8dd4451e26e26c4f819795e99901854
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/_Datas/Addressables/Items.meta
Normal file
8
Assets/_Datas/Addressables/Items.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bf02d2788bc3fe4479e22c947712f1c9
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
121
Assets/_Datas/Addressables/Items/Barrel 1.prefab
Normal file
121
Assets/_Datas/Addressables/Items/Barrel 1.prefab
Normal file
@ -0,0 +1,121 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &907389136079840969
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3843617733172158159}
|
||||
- component: {fileID: 8589504416082435264}
|
||||
m_Layer: 0
|
||||
m_Name: VisualLook
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3843617733172158159
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 907389136079840969}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.34202015, y: 0, z: 0, w: 0.9396927}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1623368721416787876}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &8589504416082435264
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 907389136079840969}
|
||||
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: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, 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: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 5
|
||||
m_Sprite: {fileID: 21300000, guid: 189d780f1507008429f2cdd1a2b4c9e8, 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!1 &8076915867083930261
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1623368721416787876}
|
||||
m_Layer: 0
|
||||
m_Name: Barrel 1
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1623368721416787876
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8076915867083930261}
|
||||
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: 1
|
||||
m_Children:
|
||||
- {fileID: 3843617733172158159}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
7
Assets/_Datas/Addressables/Items/Barrel 1.prefab.meta
Normal file
7
Assets/_Datas/Addressables/Items/Barrel 1.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 07488571c24a83d43a3ae517e83c4a5d
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/_Datas/Addressables/Sprites.meta
Normal file
8
Assets/_Datas/Addressables/Sprites.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 94bb30169461783489da7a68f0ef9361
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -4,9 +4,9 @@ SpriteAtlasImporter:
|
||||
externalObjects: {}
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
anisoLevel: 0
|
||||
compressionQuality: 0
|
||||
maxTextureSize: 0
|
||||
anisoLevel: 1
|
||||
compressionQuality: 50
|
||||
maxTextureSize: 2048
|
||||
textureCompression: 0
|
||||
filterMode: 1
|
||||
generateMipMaps: 0
|
||||
@ -17,10 +17,10 @@ SpriteAtlasImporter:
|
||||
packingSettings:
|
||||
serializedVersion: 2
|
||||
padding: 4
|
||||
blockOffset: 0
|
||||
blockOffset: 1
|
||||
allowAlphaSplitting: 0
|
||||
enableRotation: 0
|
||||
enableTightPacking: 0
|
||||
enableRotation: 1
|
||||
enableTightPacking: 1
|
||||
enableAlphaDilation: 0
|
||||
secondaryTextureSettings: {}
|
||||
variantMultiplier: 1
|
||||
|
16
Assets/_Datas/Addressables/Sprites/Items.spriteatlasv2
Normal file
16
Assets/_Datas/Addressables/Sprites/Items.spriteatlasv2
Normal file
@ -0,0 +1,16 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!612988286 &1
|
||||
SpriteAtlasAsset:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
serializedVersion: 2
|
||||
m_MasterAtlas: {fileID: 0}
|
||||
m_ImporterData:
|
||||
packables:
|
||||
- {fileID: 21300000, guid: 189d780f1507008429f2cdd1a2b4c9e8, type: 3}
|
||||
m_IsVariant: 0
|
||||
m_ScriptablePacker: {fileID: 0}
|
30
Assets/_Datas/Addressables/Sprites/Items.spriteatlasv2.meta
Normal file
30
Assets/_Datas/Addressables/Sprites/Items.spriteatlasv2.meta
Normal file
@ -0,0 +1,30 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1aad5f6adfc7c7d44b36ce007d3c0f1e
|
||||
SpriteAtlasImporter:
|
||||
externalObjects: {}
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
anisoLevel: 1
|
||||
compressionQuality: 50
|
||||
maxTextureSize: 2048
|
||||
textureCompression: 0
|
||||
filterMode: 1
|
||||
generateMipMaps: 0
|
||||
readable: 0
|
||||
crunchedCompression: 0
|
||||
sRGB: 1
|
||||
platformSettings: []
|
||||
packingSettings:
|
||||
serializedVersion: 2
|
||||
padding: 4
|
||||
blockOffset: 1
|
||||
allowAlphaSplitting: 0
|
||||
enableRotation: 1
|
||||
enableTightPacking: 1
|
||||
enableAlphaDilation: 0
|
||||
secondaryTextureSettings: {}
|
||||
variantMultiplier: 1
|
||||
bindAsDefault: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/_Datas/Raw/Sprites/Items.meta
Normal file
8
Assets/_Datas/Raw/Sprites/Items.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 010680a99335d304b8c3fc7dbf0b3a38
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/_Datas/Raw/Sprites/Items/Barrel 1.png
Normal file
BIN
Assets/_Datas/Raw/Sprites/Items/Barrel 1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 142 KiB |
156
Assets/_Datas/Raw/Sprites/Items/Barrel 1.png.meta
Normal file
156
Assets/_Datas/Raw/Sprites/Items/Barrel 1.png.meta
Normal file
@ -0,0 +1,156 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 189d780f1507008429f2cdd1a2b4c9e8
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 2
|
||||
spriteMeshType: 0
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 512
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: WindowsStoreApps
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,299 +0,0 @@
|
||||
using System;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
public class CharacterController : MonoBehaviour
|
||||
{
|
||||
#region Variables
|
||||
// Components
|
||||
public Rigidbody Rigidbody { get; private set; }
|
||||
private Transform _visualLook;
|
||||
|
||||
// Move
|
||||
[field: SerializeField, Range(1f, 20f), Tooltip("이동 속도")]
|
||||
public float MoveSpeed { get; private set; } = 7f;
|
||||
|
||||
[field: SerializeField]
|
||||
public float MoveSpeedMultiplier { get; private set; } = 1f;
|
||||
|
||||
public bool IsMoveEnabled { get; private set; } = true;
|
||||
|
||||
private bool _isMoving;
|
||||
|
||||
public bool IsMoving
|
||||
{
|
||||
get => _isMoving;
|
||||
private set
|
||||
{
|
||||
if (_isMoving == value) return;
|
||||
|
||||
_isMoving = value;
|
||||
|
||||
// if (_isMoving)
|
||||
// {
|
||||
// AudioManager.Instance.PlaySfx(_walkingSfxName, true);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// AudioManager.Instance.StopSfx(_walkingSfxName);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
// Dash
|
||||
[field: Title("대쉬")]
|
||||
[field: SerializeField, Range(1f, 50f), Tooltip("대쉬 속도")]
|
||||
public float DashSpeed { get; private set; } = 20f;
|
||||
|
||||
[field: SerializeField, Range(0.1f, 1f), Tooltip("대쉬 시간")]
|
||||
public float DashTime { get; private set; } = 0.2f;
|
||||
|
||||
[field: SerializeField, Range(0f, 5f), Tooltip("대쉬 쿨타임")]
|
||||
public float DashCooldown { get; private set; } = 0.5f;
|
||||
|
||||
[SerializeField]
|
||||
private ParticleSystem _dashParticle;
|
||||
|
||||
[Title("사운드")]
|
||||
// [SerializeField]
|
||||
// private string _walkingSfxName = "TycoonPlayerWalking";
|
||||
[SerializeField]
|
||||
private string _dashSfxName = "TycoonPlayerDashing";
|
||||
|
||||
public bool IsDashEnabled { get; private set; } = true;
|
||||
public bool IsDashing { get; private set; }
|
||||
|
||||
public bool IsDashCoolDownActive { get; private set; }
|
||||
|
||||
private Vector3 _inputDirection;
|
||||
|
||||
private Vector3 _currentDirection = Vector3.back;
|
||||
|
||||
public Vector3 CurrentDirection
|
||||
{
|
||||
get => _currentDirection;
|
||||
private set
|
||||
{
|
||||
if (value == Vector3.zero) return;
|
||||
|
||||
_currentDirection = value;
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 PushDirection { get; private set; }
|
||||
public float PushPower { get; private set; }
|
||||
public float PushPowerReduction { get; private set; }
|
||||
|
||||
private InputAction _moveAction;
|
||||
private InputAction _dashAction;
|
||||
private Coroutine _dashInstance;
|
||||
private float _finalSpeed;
|
||||
|
||||
public Action OnSucceedDash;
|
||||
|
||||
#endregion
|
||||
|
||||
// Unity events
|
||||
|
||||
#region Unity events
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
InitializeComponents();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_moveAction = PlayerInputKeyManager.Instance.GetAction(InputActionMaps.Tycoon, TycoonActions.Move);
|
||||
// _dashAction = PlayerInputKeyManager.Instance.GetAction(InputActionMaps.Tycoon, TycoonActions.Dash);
|
||||
|
||||
_moveAction.performed += OnMove;
|
||||
_moveAction.canceled += OnMove;
|
||||
// _dashAction.performed += OnDash;
|
||||
}
|
||||
|
||||
public CellManager cellManager;
|
||||
private void Update()
|
||||
{
|
||||
FlipVisualLook();
|
||||
|
||||
//UpdateCell
|
||||
cellManager.SetupCell(transform.position);
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
if (!CanMove()) return;
|
||||
|
||||
Move();
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
_moveAction.performed -= OnMove;
|
||||
_moveAction.canceled -= OnMove;
|
||||
// _dashAction.performed -= OnDash;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
// Initialize Methods
|
||||
|
||||
#region Initialize Methods
|
||||
|
||||
private void InitializeComponents()
|
||||
{
|
||||
Rigidbody = GetComponent<Rigidbody>();
|
||||
_visualLook = transform.Find("VisualLook");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
// Methods
|
||||
|
||||
#region Methods
|
||||
|
||||
// Event methods
|
||||
public void SetMoveSpeedMultiplier(float value) => MoveSpeedMultiplier = value;
|
||||
public void ResetMoveSpeedMultiplier() => MoveSpeedMultiplier = 1f;
|
||||
|
||||
public void EnableMoveAndDash()
|
||||
{
|
||||
IsMoveEnabled = true;
|
||||
IsDashEnabled = true;
|
||||
}
|
||||
|
||||
public void DisableMoveAndDash()
|
||||
{
|
||||
IsMoveEnabled = false;
|
||||
IsDashEnabled = false;
|
||||
}
|
||||
|
||||
public void SetCurrentDirection(Vector3 normalDirection) => CurrentDirection = normalDirection;
|
||||
|
||||
// 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 IsMoveEnabled;
|
||||
}
|
||||
|
||||
public void AddForce(Vector3 force, ForceMode forceMode)
|
||||
{
|
||||
Rigidbody.AddForce(force, forceMode);
|
||||
}
|
||||
|
||||
public void SetPush(Vector3 pushDirection, float pushPower)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void OnMove(InputAction.CallbackContext context)
|
||||
{
|
||||
var movementInput = _moveAction.ReadValue<Vector2>();
|
||||
_inputDirection = new Vector3(movementInput.x, 0, movementInput.y).normalized;
|
||||
}
|
||||
|
||||
public void Move()
|
||||
{
|
||||
if (IsDashing)
|
||||
{
|
||||
IsMoving = false;
|
||||
return;
|
||||
}
|
||||
|
||||
CurrentDirection = _inputDirection;
|
||||
IsMoving = _inputDirection != Vector3.zero;
|
||||
|
||||
var finalVelocity = _inputDirection * (MoveSpeed * MoveSpeedMultiplier);
|
||||
if (!Rigidbody.isKinematic)
|
||||
{
|
||||
Rigidbody.linearVelocity = finalVelocity;
|
||||
}
|
||||
}
|
||||
|
||||
// // Dash
|
||||
// public bool CanDash()
|
||||
// {
|
||||
// if (!IsDashEnabled || IsDashing || IsDashCoolDownActive) return false;
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// public void OnDash(InputAction.CallbackContext context)
|
||||
// {
|
||||
// if (!CanDash()) return;
|
||||
//
|
||||
// OnSucceedDash?.Invoke();
|
||||
// Dash();
|
||||
// }
|
||||
//
|
||||
// public void Dash()
|
||||
// {
|
||||
// Utils.StartUniqueCoroutine(this, ref _dashInstance, DashCoroutine());
|
||||
// }
|
||||
//
|
||||
// private IEnumerator DashCoroutine()
|
||||
// {
|
||||
// IsDashing = true;
|
||||
// IsDashCoolDownActive = true;
|
||||
// if (_dashParticle)
|
||||
// {
|
||||
// _dashParticle.Play();
|
||||
// }
|
||||
//
|
||||
// AudioManager.Instance.PlaySfx(_dashSfxName);
|
||||
//
|
||||
// var dashDirection = _inputDirection;
|
||||
// if (dashDirection == Vector3.zero)
|
||||
// {
|
||||
// dashDirection = CurrentDirection;
|
||||
// }
|
||||
//
|
||||
// var elapsedTime = 0f;
|
||||
// while (elapsedTime <= DashTime)
|
||||
// {
|
||||
// var finalVelocity = dashDirection * DashSpeed;
|
||||
// Rigidbody.linearVelocity = finalVelocity;
|
||||
//
|
||||
// elapsedTime += Time.fixedDeltaTime;
|
||||
// yield return new WaitForFixedUpdate();
|
||||
// }
|
||||
//
|
||||
// var newDashCooldown = DashCooldown - TycoonManager.Instance.TycoonStatus.PlayerDashCooldownReduction;
|
||||
// EndDash(newDashCooldown);
|
||||
// }
|
||||
//
|
||||
// public void EndDash(float dashCooldown = float.PositiveInfinity)
|
||||
// {
|
||||
// Utils.EndUniqueCoroutine(this, ref _dashInstance);
|
||||
// Rigidbody.linearVelocity = Vector3.zero;
|
||||
// IsDashing = false;
|
||||
//
|
||||
// if (float.IsPositiveInfinity(dashCooldown))
|
||||
// {
|
||||
// dashCooldown = DashCooldown;
|
||||
// }
|
||||
//
|
||||
// EventManager.InvokeDashCooldown(dashCooldown);
|
||||
// StartCoroutine(Utils.CoolDownCoroutine(dashCooldown, () => IsDashCoolDownActive = false));
|
||||
// }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user