Merge pull request 'camera_system' (#5) from camera_system into develop
Reviewed-on: #5 Reviewed-by: Jeonghyeon <jeonghyeon@capers.co.kr>
This commit is contained in:
commit
8e4a6d6118
@ -15,7 +15,7 @@ MonoBehaviour:
|
||||
m_DefaultGroup: 30e7f67fe9aaa7849a34c9b6e2bc53ae
|
||||
m_currentHash:
|
||||
serializedVersion: 2
|
||||
Hash: 00000000000000000000000000000000
|
||||
Hash: afbba7cb45d674ec742903c98749be0a
|
||||
m_OptimizeCatalogSize: 0
|
||||
m_BuildRemoteCatalog: 1
|
||||
m_CatalogRequestsTimeout: 0
|
||||
|
@ -15,29 +15,48 @@ MonoBehaviour:
|
||||
m_GroupName: Group
|
||||
m_GUID: 30e7f67fe9aaa7849a34c9b6e2bc53ae
|
||||
m_SerializeEntries:
|
||||
- m_GUID: 1aad5f6adfc7c7d44b36ce007d3c0f1e
|
||||
m_Address: Items
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- Atlas
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 29dcda970aef9584d9b157e766b8a278
|
||||
m_Address: RestaurantPlayer
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- Prefab
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 2eb88deceda8c443db7ec557aaef30af
|
||||
m_Address: Entry
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- Scene
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 47e757b9a170ab649af14c4d7b80ac41
|
||||
m_Address: CreateRestaurantPlayer
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- So
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: a60e7a432b7eb65419f3942f4f422fb4
|
||||
m_Address: Voyage
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- Scene
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: ddb0db863be8f254bb8a8f07d39a960e
|
||||
m_Address: RestaurantPlayerDataSo
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- So
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: de073d0136201ac4cbb36dbeb4b76fb2
|
||||
m_Address: Restaurant
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- Scene
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: e15933f76da90e742866563b5cd9e45f
|
||||
m_Address: Gold
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
m_ReadOnly: 0
|
||||
m_Settings: {fileID: 11400000, guid: d12ffbb6f886d48418efb0b6d15ccb88, type: 2}
|
||||
m_SchemaSet:
|
||||
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b3c3d746a157af64695657762823e7cb
|
||||
guid: 190b0dbdbdc29b2459a7d0eae707f531
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 67cd165408b4f85469fbe1b9ecf3b9e5
|
||||
guid: ba3a9fb25b878f647b1df9cfebb30f5b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
18
Assets/_DDD/Addressables/Sprites/Items.spriteatlasv2
Normal file
18
Assets/_DDD/Addressables/Sprites/Items.spriteatlasv2
Normal file
@ -0,0 +1,18 @@
|
||||
%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}
|
||||
- {fileID: 21300000, guid: e15933f76da90e742866563b5cd9e45f, type: 3}
|
||||
- {fileID: 21300000, guid: 0db84c35b16f34681b0309b33d8760fe, type: 3}
|
||||
m_IsVariant: 0
|
||||
m_ScriptablePacker: {fileID: 0}
|
30
Assets/_DDD/Addressables/Sprites/Items.spriteatlasv2.meta
Normal file
30
Assets/_DDD/Addressables/Sprites/Items.spriteatlasv2.meta
Normal file
@ -0,0 +1,30 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b16c797aa0ede8947b35fd354145121e
|
||||
SpriteAtlasImporter:
|
||||
externalObjects: {}
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
anisoLevel: 0
|
||||
compressionQuality: 0
|
||||
maxTextureSize: 0
|
||||
textureCompression: 0
|
||||
filterMode: 1
|
||||
generateMipMaps: 0
|
||||
readable: 0
|
||||
crunchedCompression: 0
|
||||
sRGB: 1
|
||||
platformSettings: []
|
||||
packingSettings:
|
||||
serializedVersion: 2
|
||||
padding: 4
|
||||
blockOffset: 0
|
||||
allowAlphaSplitting: 0
|
||||
enableRotation: 0
|
||||
enableTightPacking: 0
|
||||
enableAlphaDilation: 0
|
||||
secondaryTextureSettings: {}
|
||||
variantMultiplier: 1
|
||||
bindAsDefault: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,126 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &6312950592041400320
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 303053621953959099}
|
||||
- component: {fileID: 7747801985118598547}
|
||||
- component: {fileID: 4059976348031579783}
|
||||
- component: {fileID: 1363992146627826562}
|
||||
- component: {fileID: 8614123039900307451}
|
||||
m_Layer: 0
|
||||
m_Name: KeyManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &303053621953959099
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6312950592041400320}
|
||||
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: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &7747801985118598547
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6312950592041400320}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f3a9c6e7027b3d944ae69e5e7ccc7627, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_persistent: 1
|
||||
--- !u!114 &4059976348031579783
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6312950592041400320}
|
||||
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 &1363992146627826562
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6312950592041400320}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_FirstSelected: {fileID: 0}
|
||||
m_sendNavigationEvents: 1
|
||||
m_DragThreshold: 10
|
||||
--- !u!114 &8614123039900307451
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6312950592041400320}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 01614664b831546d2ae94a42149d80ac, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_SendPointerHoverToParent: 1
|
||||
m_MoveRepeatDelay: 0.5
|
||||
m_MoveRepeatRate: 0.1
|
||||
m_XRTrackingOrigin: {fileID: 0}
|
||||
m_ActionsAsset: {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
m_PointAction: {fileID: -1654692200621890270, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
m_MoveAction: {fileID: -8784545083839296357, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
m_SubmitAction: {fileID: 392368643174621059, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
m_CancelAction: {fileID: 7727032971491509709, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
m_LeftClickAction: {fileID: 3001919216989983466, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
m_MiddleClickAction: {fileID: -2185481485913320682, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
m_RightClickAction: {fileID: -4090225696740746782, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
m_ScrollWheelAction: {fileID: 6240969308177333660, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
m_TrackedDevicePositionAction: {fileID: 6564999863303420839, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
m_TrackedDeviceOrientationAction: {fileID: 7970375526676320489, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
m_DeselectOnBackgroundClick: 1
|
||||
m_PointerBehavior: 0
|
||||
m_CursorLockBehavior: 0
|
||||
m_ScrollDeltaPerTick: 6
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bfa59972eae73774abfbd334a141be1c
|
||||
guid: 31fdb3fac3e3a964f9e5bf1aa25158af
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
@ -52,6 +52,10 @@ PrefabInstance:
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3095965496140440094, guid: 3db3fc62639929c4ba6031ca4ae6600c, type: 3}
|
||||
propertyPath: _initialSkinName
|
||||
value: Basic
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5259510642736920361, guid: 3db3fc62639929c4ba6031ca4ae6600c, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: RestaurantPlayer
|
||||
@ -63,11 +67,14 @@ PrefabInstance:
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents:
|
||||
- targetCorrespondingSourceObject: {fileID: 5259510642736920361, guid: 3db3fc62639929c4ba6031ca4ae6600c, type: 3}
|
||||
insertIndex: 3
|
||||
insertIndex: 4
|
||||
addedObject: {fileID: 4699468658517678862}
|
||||
- targetCorrespondingSourceObject: {fileID: 5259510642736920361, guid: 3db3fc62639929c4ba6031ca4ae6600c, type: 3}
|
||||
insertIndex: 4
|
||||
insertIndex: 5
|
||||
addedObject: {fileID: 4956037093100801085}
|
||||
- targetCorrespondingSourceObject: {fileID: 5259510642736920361, guid: 3db3fc62639929c4ba6031ca4ae6600c, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 1115647804376030753}
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 3db3fc62639929c4ba6031ca4ae6600c, type: 3}
|
||||
--- !u!1 &7316134055819320434 stripped
|
||||
GameObject:
|
||||
@ -98,3 +105,23 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 0a83ca1b1f17a934192ef91dd4f073b8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &1115647804376030753
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7316134055819320434}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6d7e5480ae1ebf54b8537ad2a08696d2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_originalMaterial: {fileID: 2100000, guid: 288333d9c9df2d84cadf3b48d918ebdb, type: 2}
|
||||
_replacementMaterial: {fileID: 0}
|
||||
_isSkinSet: 1
|
||||
_initialSkinName: Basic
|
||||
_isRandomSkin: 0
|
||||
_isRandomRange: 0
|
||||
_randomRange: {x: 0, y: 0}
|
||||
_randomStrings: []
|
File diff suppressed because it is too large
Load Diff
@ -240,146 +240,8 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &961739749
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 961739753}
|
||||
- component: {fileID: 961739752}
|
||||
- component: {fileID: 961739751}
|
||||
- component: {fileID: 961739750}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &961739750
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 961739749}
|
||||
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: 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!81 &961739751
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 961739749}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &961739752
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 961739749}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
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.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &961739753
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 961739749}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 961739753}
|
||||
- {fileID: 203844589}
|
||||
|
15
Assets/_DDD/_Addressables/So/CreateRestaurantPlayer.asset
Normal file
15
Assets/_DDD/_Addressables/So/CreateRestaurantPlayer.asset
Normal file
@ -0,0 +1,15 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 246a7785bd15ac84b9f240005b987f1f, type: 3}
|
||||
m_Name: CreateRestaurantPlayer
|
||||
m_EditorClassIdentifier:
|
||||
_spawnPosition: {x: 0, y: 0, z: 15}
|
@ -1,7 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9f16b0b665c13444aaced76f8dfe3136
|
||||
PrefabImporter:
|
||||
guid: 47e757b9a170ab649af14c4d7b80ac41
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -18,3 +18,7 @@ MonoBehaviour:
|
||||
DashSpeed: 20
|
||||
DashTime: 0.2
|
||||
DashCooldown: 0.5
|
||||
WalkingSfxName:
|
||||
DashSfxName:
|
||||
MoveActionReference: {fileID: -1680190386980627800, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
DashActionReference: {fileID: -8150158440837788775, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 99c9720ab356a0642a771bea13969a05
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9c53962885c2c4f449125a979d6ad240
|
||||
guid: 5632ce48fcc5f7e4394454e0e526865e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
8
Assets/_DDD/_ScriptAssets/Prefabs.meta
Normal file
8
Assets/_DDD/_ScriptAssets/Prefabs.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3868c7217ab0c5042a1cc0cde0f21295
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -11,6 +11,7 @@ GameObject:
|
||||
- component: {fileID: 1761643478070701343}
|
||||
- component: {fileID: 5176902543201676162}
|
||||
- component: {fileID: 5246526151924390639}
|
||||
- component: {fileID: 8352859907019760819}
|
||||
- component: {fileID: 3365694194251356714}
|
||||
- component: {fileID: 127430239903465757}
|
||||
- component: {fileID: 3095965496140440094}
|
||||
@ -87,6 +88,92 @@ CapsuleCollider:
|
||||
m_Height: 0.1
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.1, z: 0}
|
||||
--- !u!114 &8352859907019760819
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5259510642736920361}
|
||||
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: 2
|
||||
m_UIInputModule: {fileID: 0}
|
||||
m_DeviceLostEvent:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_DeviceRegainedEvent:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ControlsChangedEvent:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionEvents:
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 351f2ccd-1f9f-44bf-9bec-d62ac5c5f408
|
||||
m_ActionName: 'Restaurant/Move[/Keyboard/w,/Keyboard/upArrow,/Keyboard/s,/Keyboard/downArrow,/Keyboard/a,/Keyboard/leftArrow,/Keyboard/d,/Keyboard/rightArrow]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 6c2ab1b8-8984-453a-af3d-a3c78ae1679a
|
||||
m_ActionName: 'Restaurant/Attack[/Mouse/leftButton,/Keyboard/enter]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: f1e71b7e-271b-4382-876a-260ea451296a
|
||||
m_ActionName: 'Restaurant/Dash[/Keyboard/space]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 852140f2-7766-474d-8707-702459ba45f3
|
||||
m_ActionName: 'Restaurant/Interact[/Keyboard/e]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: c95b2375-e6d9-4b88-9c4c-c5e76515df4b
|
||||
m_ActionName: 'Ui/Navigate[/Keyboard/w,/Keyboard/upArrow,/Keyboard/s,/Keyboard/downArrow,/Keyboard/a,/Keyboard/leftArrow,/Keyboard/d,/Keyboard/rightArrow]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 7607c7b6-cd76-4816-beef-bd0341cfe950
|
||||
m_ActionName: 'Ui/Submit[/Keyboard/enter]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 15cef263-9014-4fd5-94d9-4e4a6234a6ef
|
||||
m_ActionName: 'Ui/Cancel[/Keyboard/escape]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 32b35790-4ed0-4e9a-aa41-69ac6d629449
|
||||
m_ActionName: 'Ui/Point[/Mouse/position]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 3c7022bf-7922-4f7c-a998-c437916075ad
|
||||
m_ActionName: 'Ui/Click[/Mouse/leftButton]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 44b200b1-1557-4083-816c-b22cbdf77ddf
|
||||
m_ActionName: 'Ui/RightClick[/Mouse/rightButton]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: dad70c86-b58c-4b17-88ad-f5e53adf419e
|
||||
m_ActionName: 'Ui/MiddleClick[/Mouse/middleButton]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 0489e84a-4833-4c40-bfae-cea84b696689
|
||||
m_ActionName: 'Ui/ScrollWheel[/Mouse/scroll]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 24908448-c609-4bc3-a128-ea258674378a
|
||||
m_ActionName: Ui/TrackedDevicePosition
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 9caa3d8a-6b2f-4e8e-8bad-6ede561bd9be
|
||||
m_ActionName: Ui/TrackedDeviceOrientation
|
||||
m_NeverAutoSwitchControlSchemes: 0
|
||||
m_DefaultControlScheme:
|
||||
m_DefaultActionMap: Restaurant
|
||||
m_SplitScreenIndex: -1
|
||||
m_Camera: {fileID: 0}
|
||||
--- !u!114 &3365694194251356714
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -123,6 +210,14 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: e20368314a3139f4fb4b4e35af9fcf98, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_originalMaterial: {fileID: 0}
|
||||
_replacementMaterial: {fileID: 0}
|
||||
_isSkinSet: 1
|
||||
_initialSkinName: default
|
||||
_isRandomSkin: 0
|
||||
_isRandomRange: 0
|
||||
_randomRange: {x: 0, y: 0}
|
||||
_randomStrings: []
|
||||
--- !u!1 &6791841979869644848
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
@ -46,7 +46,7 @@ Camera:
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
@ -1,6 +1,6 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &2921199875016320617
|
||||
--- !u!1 &645007492175346922
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -8,95 +8,128 @@ GameObject:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3451175439771237481}
|
||||
- component: {fileID: 8687549037951258247}
|
||||
- component: {fileID: 8625885928614466139}
|
||||
- component: {fileID: 5533625503660040844}
|
||||
- component: {fileID: 2068856588424138268}
|
||||
- component: {fileID: 827366504865157138}
|
||||
- component: {fileID: 8205940526588409056}
|
||||
- component: {fileID: 5136368050551183548}
|
||||
m_Layer: 5
|
||||
m_Name: FadePanel
|
||||
m_Name: FadeManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &3451175439771237481
|
||||
--- !u!224 &8625885928614466139
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2921199875016320617}
|
||||
m_GameObject: {fileID: 645007492175346922}
|
||||
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_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children:
|
||||
- {fileID: 6086450555564322231}
|
||||
m_Father: {fileID: 8622113597181477381}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!225 &8687549037951258247
|
||||
CanvasGroup:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2921199875016320617}
|
||||
m_Enabled: 1
|
||||
m_Alpha: 0
|
||||
m_Interactable: 1
|
||||
m_BlocksRaycasts: 1
|
||||
m_IgnoreParentGroups: 0
|
||||
--- !u!1 &3914215459674519121
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7699237936705830620}
|
||||
- component: {fileID: 6109912877153005269}
|
||||
m_Layer: 0
|
||||
m_Name: GameManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &7699237936705830620
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3914215459674519121}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 8622113597181477381}
|
||||
- {fileID: 2840604718763097518}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &6109912877153005269
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!223 &5533625503660040844
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 645007492175346922}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 0
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_VertexColorAlwaysGammaSpace: 0
|
||||
m_AdditionalShaderChannelsFlag: 0
|
||||
m_UpdateRectTransformForStandalone: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 6
|
||||
m_TargetDisplay: 0
|
||||
--- !u!114 &2068856588424138268
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3914215459674519121}
|
||||
m_GameObject: {fileID: 645007492175346922}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 965655bbd1b2f224196ab3275ea13a57, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 1
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 1920, y: 1080}
|
||||
m_ScreenMatchMode: 1
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 0
|
||||
--- !u!114 &827366504865157138
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 645007492175346922}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreReversedGraphics: 1
|
||||
m_BlockingObjects: 0
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 55
|
||||
--- !u!225 &8205940526588409056
|
||||
CanvasGroup:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 645007492175346922}
|
||||
m_Enabled: 1
|
||||
m_Alpha: 0
|
||||
m_Interactable: 1
|
||||
m_BlocksRaycasts: 1
|
||||
m_IgnoreParentGroups: 0
|
||||
--- !u!114 &5136368050551183548
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 645007492175346922}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 41f0ee0aabb2f954d918caa8d484f646, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_persistent: 1
|
||||
_fadeTime: 0.5
|
||||
--- !u!1 &4680256555074178633
|
||||
--- !u!1 &6954525544416039378
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -104,9 +137,9 @@ GameObject:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6086450555564322231}
|
||||
- component: {fileID: 3974492216776796855}
|
||||
- component: {fileID: 7549479812998329630}
|
||||
- component: {fileID: 2840604718763097518}
|
||||
- component: {fileID: 8274624108829164416}
|
||||
- component: {fileID: 4134486114940038904}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_TagString: Untagged
|
||||
@ -114,40 +147,40 @@ GameObject:
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6086450555564322231
|
||||
--- !u!224 &2840604718763097518
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4680256555074178633}
|
||||
m_GameObject: {fileID: 6954525544416039378}
|
||||
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: 3451175439771237481}
|
||||
m_Father: {fileID: 8625885928614466139}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3974492216776796855
|
||||
--- !u!222 &8274624108829164416
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4680256555074178633}
|
||||
m_GameObject: {fileID: 6954525544416039378}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7549479812998329630
|
||||
--- !u!114 &4134486114940038904
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4680256555074178633}
|
||||
m_GameObject: {fileID: 6954525544416039378}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
@ -171,133 +204,3 @@ MonoBehaviour:
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &8696658071650620580
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8622113597181477381}
|
||||
- component: {fileID: 53800116813670316}
|
||||
- component: {fileID: 2006311345412223388}
|
||||
- component: {fileID: 1580902596820736860}
|
||||
- component: {fileID: 1026983698027542846}
|
||||
- component: {fileID: 8727490508754097892}
|
||||
m_Layer: 5
|
||||
m_Name: Canvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8622113597181477381
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8696658071650620580}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 3451175439771237481}
|
||||
m_Father: {fileID: 7699237936705830620}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!223 &53800116813670316
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8696658071650620580}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 0
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_VertexColorAlwaysGammaSpace: 1
|
||||
m_AdditionalShaderChannelsFlag: 25
|
||||
m_UpdateRectTransformForStandalone: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 6
|
||||
m_TargetDisplay: 0
|
||||
--- !u!114 &2006311345412223388
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8696658071650620580}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 1
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 1920, y: 1080}
|
||||
m_ScreenMatchMode: 1
|
||||
m_MatchWidthOrHeight: 0.5
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 0
|
||||
--- !u!114 &1580902596820736860
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8696658071650620580}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreReversedGraphics: 1
|
||||
m_BlockingObjects: 0
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 55
|
||||
--- !u!114 &1026983698027542846
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8696658071650620580}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3312d7739989d2b4e91e6319e9a96d76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Padding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Softness: {x: 0, y: 0}
|
||||
--- !u!225 &8727490508754097892
|
||||
CanvasGroup:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8696658071650620580}
|
||||
m_Enabled: 1
|
||||
m_Alpha: 1
|
||||
m_Interactable: 1
|
||||
m_BlocksRaycasts: 1
|
||||
m_IgnoreParentGroups: 0
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f17834b768fb4724380bafc46049b63c
|
||||
guid: 0aa6654feb91ef040b8b99d4f64688fc
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
@ -45,4 +45,4 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_persistent: 1
|
||||
_fadeTime: 0.5
|
||||
_sceneTransitionHandlerSo: {fileID: 11400000, guid: fbf73e00393e9004c984635e41c81ff0, type: 2}
|
8
Assets/_DDD/_ScriptAssets/So.meta
Normal file
8
Assets/_DDD/_ScriptAssets/So.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b8acef4129b47dd41996237bc1a00772
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,14 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 703a11d70c312b940b49b9a0f89746d1, type: 3}
|
||||
m_Name: FadeSceneTransitionHandlerSo
|
||||
m_EditorClassIdentifier:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2540a16dfa42fb64abe19dda610933fa
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -56,7 +56,50 @@ MonoBehaviour:
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 3
|
||||
Data: 1
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 3|System.Collections.Generic.List`1[[UnityEngine.AddressableAssets.AssetReference,
|
||||
Unity.Addressables]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 4|UnityEngine.AddressableAssets.AssetReference, Unity.Addressables
|
||||
- Name: m_AssetGUID
|
||||
Entry: 1
|
||||
Data: 47e757b9a170ab649af14c4d7b80ac41
|
||||
- Name: m_SubObjectName
|
||||
Entry: 6
|
||||
Data:
|
||||
- Name: m_SubObjectType
|
||||
Entry: 6
|
||||
Data:
|
||||
- Name: m_SubObjectGUID
|
||||
Entry: 1
|
||||
Data:
|
||||
- Name: m_EditorAssetChanged
|
||||
Entry: 5
|
||||
Data: true
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 13
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 13
|
||||
Data:
|
@ -17,3 +17,5 @@ MonoBehaviour:
|
||||
- {fileID: 4889131746858770208, guid: d90fdb17f0162334daadc6fc93e9a0e3, type: 3}
|
||||
- {fileID: 6471498998539637564, guid: fa2ad62c75b1549f09597e47ed5f7cfb, type: 3}
|
||||
- {fileID: 7665229218737596710, guid: 71b177c2a18314c588da30429451666a, type: 3}
|
||||
- {fileID: 622422277636247943, guid: d95124918e5a4a246abb0d378b14d3fa, type: 3}
|
||||
- {fileID: 5136368050551183548, guid: 0aa6654feb91ef040b8b99d4f64688fc, type: 3}
|
16
Assets/_DDD/_ScriptAssets/So/SceneTransitionHandlerSo.asset
Normal file
16
Assets/_DDD/_ScriptAssets/So/SceneTransitionHandlerSo.asset
Normal file
@ -0,0 +1,16 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c8d0f2d4eb3cfdc45a258a64641fe3e8, type: 3}
|
||||
m_Name: SceneTransitionHandlerSo
|
||||
m_EditorClassIdentifier:
|
||||
Handlers:
|
||||
- {fileID: 11400000, guid: 2540a16dfa42fb64abe19dda610933fa, type: 2}
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fbf73e00393e9004c984635e41c81ff0
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -25,7 +25,7 @@ public async void PostInit()
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Assert(false, "Addressables initialization failed");
|
||||
Debug.Assert(false, $"Addressables initialization failed\n{e}");
|
||||
}
|
||||
}
|
||||
|
||||
|
41
Assets/_DDD/_Scripts/CameraSystem/CameraGameObject.cs
Normal file
41
Assets/_DDD/_Scripts/CameraSystem/CameraGameObject.cs
Normal file
@ -0,0 +1,41 @@
|
||||
using Unity.Cinemachine;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
public class CameraGameObject : MonoBehaviour
|
||||
{
|
||||
[field: SerializeField]
|
||||
public CameraType CameraType { get; private set; }
|
||||
|
||||
private CinemachineCamera _cinemachineCamera;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_cinemachineCamera = GetComponent<CinemachineCamera>();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
CameraManager.Instance.RegisterCamera(this);
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (CameraManager.Instance)
|
||||
{
|
||||
CameraManager.Instance.UnRegisterCamera(this);
|
||||
}
|
||||
}
|
||||
|
||||
public int GetPriority() => _cinemachineCamera.Priority;
|
||||
public void SetPriority(int newPriority) => _cinemachineCamera.Priority = newPriority;
|
||||
public void SetFollowTarget(Transform target) => _cinemachineCamera.Follow = target;
|
||||
public void SetLookAtTarget(Transform target) => _cinemachineCamera.LookAt = target;
|
||||
public void SetFollowAndLookAtTarget(Transform target)
|
||||
{
|
||||
SetFollowTarget(target);
|
||||
SetLookAtTarget(target);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1b1ef0319328bf84a98bed912be4c61d
|
@ -1,62 +1,52 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Sirenix.OdinInspector;
|
||||
using Unity.Cinemachine;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
public enum CameraType
|
||||
{
|
||||
BaseCam = 0,
|
||||
None = 0,
|
||||
RestaurantBaseCamera = 1
|
||||
}
|
||||
|
||||
public class CameraManager : Singleton<CameraManager>
|
||||
|
||||
public class CameraManager : Singleton<CameraManager>, IManager
|
||||
{
|
||||
[ShowInInspector, ReadOnly]
|
||||
private Dictionary<CameraType, CinemachineCamera> _cameraDict;
|
||||
private Dictionary<CameraType, CameraGameObject> _cameraGameObjects = new();
|
||||
|
||||
private CinemachineBrain _cinemachineBrain;
|
||||
|
||||
protected override void OnAwake()
|
||||
|
||||
public void Init()
|
||||
{
|
||||
base.OnAwake();
|
||||
|
||||
_cinemachineBrain = GetComponent<CinemachineBrain>();
|
||||
}
|
||||
|
||||
public void ChangeScene(SceneType sceneType)
|
||||
public void PostInit()
|
||||
{
|
||||
var foundCams = FindObjectsByType<CinemachineCamera>(FindObjectsInactive.Include, FindObjectsSortMode.None);
|
||||
_cameraDict = new Dictionary<CameraType, CinemachineCamera>(foundCams.Length);
|
||||
|
||||
}
|
||||
|
||||
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}");
|
||||
}
|
||||
}
|
||||
public void RegisterCamera(CameraGameObject cameraGameObject)
|
||||
{
|
||||
_cameraGameObjects.TryAdd(cameraGameObject.CameraType, cameraGameObject);
|
||||
}
|
||||
|
||||
if (sceneType == SceneType.Restaurant)
|
||||
{
|
||||
SwitchCamera(CameraType.BaseCam);
|
||||
}
|
||||
public void UnRegisterCamera(CameraGameObject cameraGameObject)
|
||||
{
|
||||
_cameraGameObjects.Remove(cameraGameObject.CameraType);
|
||||
}
|
||||
|
||||
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)
|
||||
foreach (var item in _cameraGameObjects)
|
||||
{
|
||||
pair.Value.Priority = (pair.Key == cameraType) ? 10 : 0;
|
||||
int newPriority = item.Value.CameraType == cameraType ? 10 : 0;
|
||||
item.Value.SetPriority(newPriority);
|
||||
}
|
||||
}
|
||||
|
||||
public CameraGameObject GetCameraGameObject(CameraType cameraType) => _cameraGameObjects[cameraType];
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
public class TitleSystem : MonoBehaviour
|
||||
{
|
||||
private GameObject _titlePanel;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_titlePanel = GameObject.Find("Uis/TitleCanvas/TitlePanel").gameObject;
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_titlePanel.SetActive(true);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c837bbd9eecddc04f9c625fa14062a34
|
@ -4,7 +4,6 @@
|
||||
using Spine.Unity;
|
||||
using UnityEngine;
|
||||
using AnimationState = Spine.AnimationState;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
namespace DDD
|
||||
{
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6d7e5480ae1ebf54b8537ad2a08696d2
|
@ -17,7 +17,7 @@ public async void PostInit()
|
||||
{
|
||||
try
|
||||
{
|
||||
ItemDataSo = await AssetManager.LoadAsset<ItemDataSo>("ItemDataSo");
|
||||
ItemDataSo = await AssetManager.LoadAsset<ItemDataSo>(DataConstants.ItemDataSo);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -2,8 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.ResourceManagement.ResourceProviders;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
@ -23,7 +22,7 @@ public class GameFlowManager : Singleton<GameFlowManager>, IManager
|
||||
|
||||
public void Init()
|
||||
{
|
||||
|
||||
GameFlowDataSo.CurrentGameState = GameFlowState.None;
|
||||
}
|
||||
|
||||
public async void PostInit()
|
||||
@ -41,7 +40,7 @@ public async void PostInit()
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsGameStarted() => GameFlowDataSo.CurrentGameState != GameFlowState.None;
|
||||
private bool IsGameStarted() => GameFlowDataSo.CurrentGameState != GameFlowState.None;
|
||||
|
||||
public async Task ChangeFlow(GameFlowState newFlowState)
|
||||
{
|
||||
@ -61,33 +60,34 @@ private bool CanChangeFlow(GameFlowState newFlowState)
|
||||
return true;
|
||||
}
|
||||
|
||||
public void EndCurrentFlow()
|
||||
private void EndCurrentFlow()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public async Task ReadyNewFlow(GameFlowState newFlowState)
|
||||
private async Task ReadyNewFlow(GameFlowState newFlowState)
|
||||
{
|
||||
GameFlowDataSo.CurrentGameState = newFlowState;
|
||||
|
||||
if (GameFlowAssetsSo.FlowItems.TryGetValue(newFlowState, out var stringKeys))
|
||||
{
|
||||
List<Task<UnityEngine.Object>> loadTasks = new(stringKeys.Count);
|
||||
foreach (var key in stringKeys)
|
||||
{
|
||||
loadTasks.Add(AssetManager.LoadAsset<UnityEngine.Object>(key));
|
||||
await AssetManager.LoadAsset<UnityEngine.Object>(key);
|
||||
}
|
||||
|
||||
await Task.WhenAll(loadTasks);
|
||||
}
|
||||
|
||||
if (GameFlowAssetsSo.FlowAssets.TryGetValue(newFlowState, out var assetRefs))
|
||||
{
|
||||
List<Task<UnityEngine.Object>> loadTasks = new(assetRefs.Count);
|
||||
foreach (var assetRef in assetRefs)
|
||||
{
|
||||
loadTasks.Add(AssetManager.LoadAsset<UnityEngine.Object>(assetRef));
|
||||
var obj = await AssetManager.LoadAsset<UnityEngine.Object>(assetRef);
|
||||
|
||||
if (obj is GameFlowReadyHandler handler)
|
||||
{
|
||||
await handler.OnReadyNewFlow(newFlowState);
|
||||
}
|
||||
}
|
||||
|
||||
await Task.WhenAll(loadTasks);
|
||||
}
|
||||
|
||||
OpenFlowScene(newFlowState);
|
||||
@ -95,26 +95,33 @@ public async Task ReadyNewFlow(GameFlowState newFlowState)
|
||||
StartFlow();
|
||||
}
|
||||
|
||||
public void OpenFlowScene(GameFlowState newFlowState)
|
||||
private async void OpenFlowScene(GameFlowState newFlowState)
|
||||
{
|
||||
if (GetFlowScene(newFlowState, out var sceneToLoad))
|
||||
try
|
||||
{
|
||||
SceneManager.Instance.ActivateScene(sceneToLoad);
|
||||
if (GetFlowScene(newFlowState, out var sceneToLoad))
|
||||
{
|
||||
await SceneManager.Instance.ActivateScene(sceneToLoad);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Assert(false, "Scene not found!");
|
||||
}
|
||||
}
|
||||
else
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Assert(false, "Scene not found!");
|
||||
Debug.LogError(e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public bool GetFlowScene(GameFlowState flowState, out SceneType sceneType)
|
||||
private bool GetFlowScene(GameFlowState flowState, out SceneType sceneType)
|
||||
{
|
||||
return GameFlowSceneMappingSo.FlowToSceneMapping.TryGetValue(flowState, out sceneType);
|
||||
}
|
||||
|
||||
public void StartFlow()
|
||||
private void StartFlow()
|
||||
{
|
||||
// Broadcast new flow started
|
||||
|
||||
}
|
||||
}
|
||||
}
|
10
Assets/_DDD/_Scripts/GameFlow/GameFlowReadyHandler.cs
Normal file
10
Assets/_DDD/_Scripts/GameFlow/GameFlowReadyHandler.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
public abstract class GameFlowReadyHandler : ScriptableObject
|
||||
{
|
||||
public abstract Task OnReadyNewFlow(GameFlowState newFlowState);
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b072e73316b7d534b8ec18ffa0b8bfa2
|
54
Assets/_DDD/_Scripts/GameFramework/FadeManager.cs
Normal file
54
Assets/_DDD/_Scripts/GameFramework/FadeManager.cs
Normal file
@ -0,0 +1,54 @@
|
||||
using System.Threading.Tasks;
|
||||
using DG.Tweening;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
public class FadeManager : Singleton<FadeManager>, IManager
|
||||
{
|
||||
[SerializeField]
|
||||
private float _fadeOutDuration = 0.5f;
|
||||
|
||||
[SerializeField]
|
||||
private float _fadeInDuration = 1f;
|
||||
|
||||
private CanvasGroup _canvasGroup;
|
||||
|
||||
public void Init()
|
||||
{
|
||||
_canvasGroup = GetComponent<CanvasGroup>();
|
||||
}
|
||||
|
||||
public void PostInit()
|
||||
{
|
||||
_canvasGroup.alpha = 0f;
|
||||
_canvasGroup.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
public async Task FadeOut()
|
||||
{
|
||||
_canvasGroup.gameObject.SetActive(true);
|
||||
_canvasGroup.blocksRaycasts = true;
|
||||
|
||||
await _canvasGroup.DOFade(1f, _fadeOutDuration)
|
||||
.SetUpdate(true)
|
||||
.AsyncWaitForCompletion();
|
||||
}
|
||||
|
||||
public async Task FadeIn()
|
||||
{
|
||||
await _canvasGroup.DOFade(0f, _fadeInDuration)
|
||||
.SetUpdate(true)
|
||||
.AsyncWaitForCompletion();
|
||||
|
||||
_canvasGroup.blocksRaycasts = false;
|
||||
_canvasGroup.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
public async Task FadeOutIn()
|
||||
{
|
||||
await FadeOut();
|
||||
await FadeIn();
|
||||
}
|
||||
}
|
||||
}
|
2
Assets/_DDD/_Scripts/GameFramework/FadeManager.cs.meta
Normal file
2
Assets/_DDD/_Scripts/GameFramework/FadeManager.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 41f0ee0aabb2f954d918caa8d484f646
|
@ -20,7 +20,6 @@ protected void Start()
|
||||
return;
|
||||
}
|
||||
|
||||
// Entry Scene에서 뭘 해야할까?
|
||||
// 매니저 초기화
|
||||
_managerInstances = new List<Singleton>(_managerDefinitionSo.ManagerClasses.Count);
|
||||
|
||||
@ -42,7 +41,6 @@ protected void Start()
|
||||
manager.PostInit();
|
||||
}
|
||||
}
|
||||
// 초기 씬으로 보내주기
|
||||
}
|
||||
}
|
||||
}
|
8
Assets/_DDD/_Scripts/GameFramework/Scene.meta
Normal file
8
Assets/_DDD/_Scripts/GameFramework/Scene.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d2426db0b60a2114ea125d793d3c6741
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,23 @@
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
[CreateAssetMenu(fileName = "FadeSceneTransitionHandlerSo", menuName = "GameFramework/FadeSceneTransitionHandlerSo")]
|
||||
public class FadeSceneTransitionHandlerSo : SceneTransitionHandler
|
||||
{
|
||||
[SerializeField]
|
||||
private float _delayBeforeFadeIn = 1f;
|
||||
|
||||
public override async Task OnBeforeSceneActivate(SceneType sceneType)
|
||||
{
|
||||
await FadeManager.Instance.FadeOut();
|
||||
}
|
||||
|
||||
public override async Task OnAfterSceneActivate(SceneType sceneType)
|
||||
{
|
||||
await Task.Delay((int)(_delayBeforeFadeIn * 1000));
|
||||
await FadeManager.Instance.FadeIn();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 703a11d70c312b940b49b9a0f89746d1
|
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.ResourceManagement.ResourceProviders;
|
||||
@ -15,10 +16,12 @@ public enum SceneType
|
||||
|
||||
public class SceneManager : Singleton<SceneManager>, IManager
|
||||
{
|
||||
[SerializeField]
|
||||
private SceneTransitionHandlerSo _sceneTransitionHandlerSo;
|
||||
|
||||
private Dictionary<SceneType, SceneInstance> _loadedScenes;
|
||||
|
||||
private SceneInstance _currentSceneInstance;
|
||||
|
||||
public Action<SceneInstance> OnSceneChanged;
|
||||
|
||||
public void Init()
|
||||
@ -35,16 +38,7 @@ public async void PostInit()
|
||||
{
|
||||
if (sceneType == SceneType.Entry) continue;
|
||||
|
||||
var sceneInstance = await AssetManager.LoadScene(sceneType.ToString());
|
||||
if (sceneInstance.Scene.IsValid())
|
||||
{
|
||||
_loadedScenes[sceneType] = sceneInstance;
|
||||
|
||||
foreach (var go in sceneInstance.Scene.GetRootGameObjects())
|
||||
{
|
||||
go.SetActive(false);
|
||||
}
|
||||
}
|
||||
await PreloadSceneAsync(sceneType);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@ -78,8 +72,13 @@ public async Task PreloadSceneAsync(SceneType sceneType)
|
||||
}
|
||||
}
|
||||
|
||||
public void ActivateScene(SceneType sceneType)
|
||||
public async Task ActivateScene(SceneType sceneType)
|
||||
{
|
||||
foreach (var handler in _sceneTransitionHandlerSo.Handlers.Where(handler => handler != null))
|
||||
{
|
||||
await handler.OnBeforeSceneActivate(sceneType);
|
||||
}
|
||||
|
||||
if (_loadedScenes.TryGetValue(sceneType, out var sceneInstance))
|
||||
{
|
||||
foreach (var root in sceneInstance.Scene.GetRootGameObjects())
|
||||
@ -94,6 +93,11 @@ public void ActivateScene(SceneType sceneType)
|
||||
{
|
||||
Debug.LogError($"[SceneManager] Scene not loaded: {sceneType}");
|
||||
}
|
||||
|
||||
foreach (var handler in _sceneTransitionHandlerSo.Handlers.Where(handler => handler != null))
|
||||
{
|
||||
await handler.OnAfterSceneActivate(sceneType);
|
||||
}
|
||||
}
|
||||
|
||||
public void DeactivateScene(SceneType sceneType)
|
@ -0,0 +1,11 @@
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
public abstract class SceneTransitionHandler : ScriptableObject
|
||||
{
|
||||
public abstract Task OnBeforeSceneActivate(SceneType sceneType);
|
||||
public abstract Task OnAfterSceneActivate(SceneType sceneType);
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 23db33a4e8a50464e8b57e36db4b0f25
|
@ -0,0 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
[CreateAssetMenu(fileName = "SceneTransitionHandlerSo", menuName = "GameFramework/SceneTransitionHandlerSo")]
|
||||
public class SceneTransitionHandlerSo : ScriptableObject
|
||||
{
|
||||
public List<SceneTransitionHandler> Handlers = new();
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c8d0f2d4eb3cfdc45a258a64641fe3e8
|
@ -0,0 +1,20 @@
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
[CreateAssetMenu(fileName = "CreateRestaurantPlayer", menuName = "GameFlow/CreateRestaurantPlayer")]
|
||||
public class CreateRestaurantPlayer : GameFlowReadyHandler
|
||||
{
|
||||
[SerializeField]
|
||||
private Vector3 _spawnPosition;
|
||||
|
||||
public override async Task OnReadyNewFlow(GameFlowState newFlowState)
|
||||
{
|
||||
var playerPrefab = await AssetManager.LoadAsset<GameObject>(CommonConstants.RestaurantPlayer);
|
||||
var player = Instantiate(playerPrefab, _spawnPosition, playerPrefab.transform.rotation);
|
||||
player.name = CommonConstants.RestaurantPlayer;
|
||||
CameraManager.Instance.GetCameraGameObject(CameraType.RestaurantBaseCamera).SetFollowAndLookAtTarget(player.transform);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 246a7785bd15ac84b9f240005b987f1f
|
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bc99ee6ab7cf7d34fb103aa950497c91
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,9 +0,0 @@
|
||||
namespace DDD
|
||||
{
|
||||
public interface IStateMachine
|
||||
{
|
||||
void Enter();
|
||||
void Update();
|
||||
void Exit();
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c111bfa40d649ac4c9d401efa650734d
|
@ -1,19 +0,0 @@
|
||||
namespace DDD
|
||||
{
|
||||
public class PlayerStateMachine
|
||||
{
|
||||
private IStateMachine _currentStateMachine;
|
||||
|
||||
public void ChangeState(IStateMachine newStateMachine)
|
||||
{
|
||||
_currentStateMachine?.Exit();
|
||||
_currentStateMachine = newStateMachine;
|
||||
_currentStateMachine.Enter();
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
_currentStateMachine?.Update();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2887dac388e7a244585d84329954e38f
|
@ -1,191 +0,0 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
public class RestaurantPlayer : MonoBehaviour
|
||||
{
|
||||
#region Variables
|
||||
|
||||
private RestaurantPlayerDataSo _playerData;
|
||||
private RestaurantPlayerView _playerView;
|
||||
|
||||
private InputAction _moveAction;
|
||||
private InputAction _dashAction;
|
||||
private Coroutine _dashInstance;
|
||||
|
||||
private Vector3 _inputDirection;
|
||||
private Vector3 _currentDirection = Vector3.back;
|
||||
|
||||
public bool IsMoving;
|
||||
public bool IsDashing;
|
||||
public bool IsDashCoolDownActive;
|
||||
|
||||
private float _finalSpeed;
|
||||
|
||||
private PlayerStateMachine _stateMachine;
|
||||
|
||||
#endregion
|
||||
|
||||
// Unity events
|
||||
|
||||
#region Unity events
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_playerData = Addressables.LoadAssetAsync<RestaurantPlayerDataSo>("RestaurantPlayerDataSo").WaitForCompletion();
|
||||
_playerView = GetComponent<RestaurantPlayerView>();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_moveAction = InputManager.Instance.GetAction(InputActionMaps.Restaurant, nameof(RestaurantActions.Move));
|
||||
_dashAction = InputManager.Instance.GetAction(InputActionMaps.Restaurant, nameof(RestaurantActions.Dash));
|
||||
|
||||
_moveAction.performed += OnMove;
|
||||
_moveAction.canceled += OnMove;
|
||||
_dashAction.performed += OnDash;
|
||||
|
||||
_stateMachine = new PlayerStateMachine();
|
||||
ChangeState(new IdleState(this, _playerView));
|
||||
}
|
||||
|
||||
//public CellManager cellManager;
|
||||
private void Update()
|
||||
{
|
||||
_stateMachine.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
|
||||
|
||||
// Methods
|
||||
#region Methods
|
||||
|
||||
public void SetCurrentDirection(Vector3 normalDirection)
|
||||
{
|
||||
if (normalDirection == Vector3.zero) return;
|
||||
|
||||
_currentDirection = normalDirection;
|
||||
}
|
||||
|
||||
private void FlipVisualLook()
|
||||
{
|
||||
Vector3 localScale = _playerView.GetLocalScale();
|
||||
localScale.x = _currentDirection.x switch
|
||||
{
|
||||
> 0.01f => -Mathf.Abs(localScale.x),
|
||||
< -0.01f => Mathf.Abs(localScale.x),
|
||||
_ => localScale.x
|
||||
};
|
||||
_playerView.SetLocalScale(localScale);
|
||||
}
|
||||
|
||||
public void OnMove(InputAction.CallbackContext context)
|
||||
{
|
||||
var movementInput = _moveAction.ReadValue<Vector2>();
|
||||
_inputDirection = new Vector3(movementInput.x, 0, movementInput.y).normalized;
|
||||
}
|
||||
|
||||
public bool CanMove()
|
||||
{
|
||||
return _playerData.IsMoveEnabled && !IsDashing;
|
||||
}
|
||||
|
||||
public void Move()
|
||||
{
|
||||
SetCurrentDirection(_inputDirection);
|
||||
IsMoving = _inputDirection != Vector3.zero;
|
||||
|
||||
var finalVelocity = _inputDirection * _playerData.MoveSpeed;
|
||||
_playerView.SetVelocity(finalVelocity);
|
||||
}
|
||||
|
||||
public void OnDash(InputAction.CallbackContext context)
|
||||
{
|
||||
if (!CanDash()) return;
|
||||
|
||||
Dash();
|
||||
}
|
||||
|
||||
public bool CanDash()
|
||||
{
|
||||
return _playerData.IsDashEnabled && !IsDashing && !IsDashCoolDownActive;
|
||||
}
|
||||
|
||||
public void Dash()
|
||||
{
|
||||
Utils.StartUniqueCoroutine(this, ref _dashInstance, DashCoroutine());
|
||||
}
|
||||
|
||||
private IEnumerator DashCoroutine()
|
||||
{
|
||||
IsDashing = true;
|
||||
IsDashCoolDownActive = true;
|
||||
_playerView.PlayDashParticle();
|
||||
|
||||
AudioManager.Instance.PlaySfx(_playerData.DashSfxName);
|
||||
|
||||
var dashDirection = _inputDirection;
|
||||
if (dashDirection == Vector3.zero)
|
||||
{
|
||||
dashDirection = _currentDirection;
|
||||
}
|
||||
|
||||
var elapsedTime = 0f;
|
||||
while (elapsedTime <= _playerData.DashTime)
|
||||
{
|
||||
var finalVelocity = dashDirection * _playerData.DashSpeed;
|
||||
_playerView.SetVelocity(finalVelocity);
|
||||
|
||||
elapsedTime += Time.fixedDeltaTime;
|
||||
yield return new WaitForFixedUpdate();
|
||||
}
|
||||
|
||||
EndDash(_playerData.DashCooldown);
|
||||
}
|
||||
|
||||
public void EndDash(float dashCooldown = float.PositiveInfinity)
|
||||
{
|
||||
Utils.EndUniqueCoroutine(this, ref _dashInstance);
|
||||
_playerView.SetVelocity(Vector3.zero);
|
||||
IsDashing = false;
|
||||
|
||||
if (float.IsPositiveInfinity(dashCooldown))
|
||||
{
|
||||
dashCooldown = _playerData.DashCooldown;
|
||||
}
|
||||
|
||||
// TODO : ui 연동
|
||||
StartCoroutine(Utils.CoolDownCoroutine(dashCooldown, () => IsDashCoolDownActive = false));
|
||||
}
|
||||
|
||||
public void ChangeState(IStateMachine stateMachine)
|
||||
{
|
||||
_stateMachine.ChangeState(stateMachine);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 620909d88f805ee4898b9af964a7f0e8
|
@ -1,57 +0,0 @@
|
||||
using Spine;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
public static class RestaurantSpineAnimation
|
||||
{
|
||||
public const string Idle = "Idle";
|
||||
public const string Walking = "RunFast";
|
||||
public const string ServingIdle = "Serving/ServingIdle";
|
||||
public const string Serving = "Serving/ServingFast";
|
||||
public const string Dash = "Dash";
|
||||
public const string CleaningFloor = "Cleaning/CleaningFloor";
|
||||
public const string CleaningTable = "Cleaning/CleaningTable";
|
||||
public const string MakingCocktail = "BeerMaker";
|
||||
public const string Pumping = "Attack/AttackWhip";
|
||||
public const string AttackSlime = "Attack/AttackSlime";
|
||||
public const string AttackLimeTree = "Attack/AttackBat";
|
||||
public const string CookingFried = "Cooking/CookingFried";
|
||||
public const string CookingStew = "Cooking/CookingStew";
|
||||
}
|
||||
|
||||
public class RestaurantPlayerView : MonoBehaviour
|
||||
{
|
||||
private Rigidbody _rigidbody;
|
||||
private Transform _visualLook;
|
||||
private SpineController _spineController;
|
||||
|
||||
private ParticleSystem _dashParticle;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_rigidbody = GetComponent<Rigidbody>();
|
||||
_visualLook = transform.Find("VisualLook");
|
||||
_spineController = GetComponent<SpineController>();
|
||||
}
|
||||
|
||||
public void SetVelocity(Vector3 velocity) => _rigidbody.linearVelocity = velocity;
|
||||
public Vector3 GetLocalScale() => _visualLook.localScale;
|
||||
public void SetLocalScale(Vector3 localScale) => _visualLook.localScale = localScale;
|
||||
|
||||
public void PlayDashParticle()
|
||||
{
|
||||
if (_dashParticle)
|
||||
{
|
||||
_dashParticle.Play();
|
||||
}
|
||||
}
|
||||
|
||||
public TrackEntry PlayAnimation(string animationName, bool isLoopActive, float speed = 1f, bool isReverse = false, int trackIndex = 0)
|
||||
=> _spineController.PlayAnimation(animationName, isLoopActive, speed, isReverse, trackIndex);
|
||||
public TrackEntry PlayAnimationDuration(string animationName, bool isLoopActive, float duration, bool isReverse = false, int trackIndex = 0) =>
|
||||
_spineController.PlayAnimationDuration(animationName, isLoopActive, duration, isReverse, trackIndex);
|
||||
public TrackEntry AddAnimation(string animationName, bool isLoopActive, int trackIndex = 0)
|
||||
=> _spineController.AddAnimation(animationName, isLoopActive, trackIndex);
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c665f9c268555a74a8a805d67d09c80e
|
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ef03a607bdc3e914aad8e99ab5c6f91b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,32 +0,0 @@
|
||||
namespace DDD
|
||||
{
|
||||
public class IdleState : IStateMachine
|
||||
{
|
||||
private RestaurantPlayer _player;
|
||||
private RestaurantPlayerView _view;
|
||||
|
||||
public IdleState(RestaurantPlayer player, RestaurantPlayerView view)
|
||||
{
|
||||
_player = player;
|
||||
_view = view;
|
||||
}
|
||||
|
||||
public void Enter()
|
||||
{
|
||||
_view.PlayAnimation(RestaurantSpineAnimation.Idle, true);
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (_player.IsMoving)
|
||||
{
|
||||
_player.ChangeState(new WalkingState(_player, _view));
|
||||
}
|
||||
}
|
||||
|
||||
public void Exit()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8dd7a1f24d102af41848ae82fb8f8ca5
|
@ -1,32 +0,0 @@
|
||||
namespace DDD
|
||||
{
|
||||
public class WalkingState : IStateMachine
|
||||
{
|
||||
private RestaurantPlayer _player;
|
||||
private RestaurantPlayerView _view;
|
||||
|
||||
public WalkingState(RestaurantPlayer player, RestaurantPlayerView view)
|
||||
{
|
||||
_player = player;
|
||||
_view = view;
|
||||
}
|
||||
|
||||
public void Enter()
|
||||
{
|
||||
_view.PlayAnimation(RestaurantSpineAnimation.Walking, true);
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (!_player.IsMoving)
|
||||
{
|
||||
_player.ChangeState(new IdleState(_player, _view));
|
||||
}
|
||||
}
|
||||
|
||||
public void Exit()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 08926e2ade87cab459e625851316b00c
|
@ -4,6 +4,39 @@ namespace DDD
|
||||
{
|
||||
public class RestaurantCharacterAnimation : MonoBehaviour
|
||||
{
|
||||
|
||||
private RestaurantPlayerMovement _restaurantPlayerMovement;
|
||||
private SpineController _spineController;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_restaurantPlayerMovement = GetComponent<RestaurantPlayerMovement>();
|
||||
_spineController = GetComponent<SpineController>();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_restaurantPlayerMovement.OnMoving += OnMove;
|
||||
_restaurantPlayerMovement.OnDashing += OnDash;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (_restaurantPlayerMovement)
|
||||
{
|
||||
_restaurantPlayerMovement.OnMoving -= OnMove;
|
||||
_restaurantPlayerMovement.OnDashing -= OnDash;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnMove(bool isMoving)
|
||||
{
|
||||
string animationName = isMoving ? RestaurantPlayerAnimation.Walk : RestaurantPlayerAnimation.Idle;
|
||||
_spineController.PlayAnimation(animationName, true);
|
||||
}
|
||||
|
||||
private void OnDash(float dashTime)
|
||||
{
|
||||
_spineController.PlayAnimationDuration(RestaurantPlayerAnimation.Dash, false, duration:dashTime);
|
||||
}
|
||||
}
|
||||
}
|
@ -4,6 +4,32 @@ namespace DDD
|
||||
{
|
||||
public class RestaurantPlayerCharacter : RestaurantCharacter
|
||||
{
|
||||
private RestaurantPlayerMovement _movement;
|
||||
|
||||
private Transform _visualLook;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_movement = GetComponent<RestaurantPlayerMovement>();
|
||||
|
||||
_visualLook = transform.Find(CommonConstants.VisualLook);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
FlipVisualLook();
|
||||
}
|
||||
|
||||
private void FlipVisualLook()
|
||||
{
|
||||
Vector3 localScale = _visualLook.localScale;
|
||||
localScale.x = _movement.GetCurrentDirection().x switch
|
||||
{
|
||||
> 0.01f => -Mathf.Abs(localScale.x),
|
||||
< -0.01f => Mathf.Abs(localScale.x),
|
||||
_ => localScale.x
|
||||
};
|
||||
_visualLook.localScale = localScale;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
@ -12,9 +12,12 @@ public class RestaurantPlayerDataSo : ScriptableObject
|
||||
public bool IsDashEnabled = true;
|
||||
public float DashSpeed = 20f;
|
||||
public float DashTime = 0.2f;
|
||||
public float DashCooldown = 0.5f;
|
||||
public float DashCooldown = 2f;
|
||||
|
||||
public string WalkingSfxName;
|
||||
public string DashSfxName;
|
||||
|
||||
public InputActionReference MoveActionReference;
|
||||
public InputActionReference DashActionReference;
|
||||
}
|
||||
}
|
@ -1,11 +1,129 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
public class RestaurantPlayerMovement : RestaurantCharacterMovement
|
||||
{
|
||||
// TODO : TryMove // 인풋에 등록할 함수
|
||||
// TODO : CanMove // Check IMovementConstraint
|
||||
// TODO : Move // 실제 트랜스레이션, 슬라이딩, 충돌
|
||||
private Rigidbody _rigidbody;
|
||||
|
||||
private RestaurantPlayerDataSo _playerData;
|
||||
|
||||
private Vector3 _inputDirection;
|
||||
private Vector3 _currentDirection;
|
||||
private bool _isMoving;
|
||||
private bool _isDashing;
|
||||
private bool _isDashCooldown;
|
||||
private bool _isInitialized;
|
||||
|
||||
public Action<bool> OnMoving;
|
||||
public Action<float> OnDashing;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_rigidbody = GetComponent<Rigidbody>();
|
||||
}
|
||||
|
||||
private async void Start()
|
||||
{
|
||||
try
|
||||
{
|
||||
_playerData = await AssetManager.LoadAsset<RestaurantPlayerDataSo>(DataConstants.RestaurantPlayerDataSo);
|
||||
|
||||
_playerData.MoveActionReference.action.performed += OnMove;
|
||||
_playerData.MoveActionReference.action.canceled += OnMove;
|
||||
_playerData.DashActionReference.action.performed += OnDash;
|
||||
|
||||
_isInitialized = true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError($"_playerData load failed\n{e}");
|
||||
}
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
if (_isInitialized == false) return;
|
||||
|
||||
if (CanMove())
|
||||
{
|
||||
Move();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (_playerData)
|
||||
{
|
||||
_playerData.MoveActionReference.action.performed -= OnMove;
|
||||
_playerData.MoveActionReference.action.canceled -= OnMove;
|
||||
_playerData.DashActionReference.action.performed -= OnDash;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetCurrentDirection(Vector3 normalDirection)
|
||||
{
|
||||
if (_inputDirection == Vector3.zero) return;
|
||||
|
||||
_currentDirection = normalDirection;
|
||||
}
|
||||
|
||||
private void OnMove(InputAction.CallbackContext context)
|
||||
{
|
||||
Vector2 movementInput = context.ReadValue<Vector2>();
|
||||
_inputDirection = new Vector3(movementInput.x, 0f, movementInput.y);
|
||||
}
|
||||
|
||||
private bool CanMove()
|
||||
{
|
||||
return _playerData.IsMoveEnabled && _isDashing == false;
|
||||
}
|
||||
|
||||
private void Move()
|
||||
{
|
||||
SetCurrentDirection(_inputDirection);
|
||||
|
||||
_isMoving = _inputDirection != Vector3.zero;
|
||||
OnMoving?.Invoke(_isMoving);
|
||||
|
||||
Vector3 finalVelocity = _inputDirection * _playerData.MoveSpeed;
|
||||
_rigidbody.linearVelocity = finalVelocity;
|
||||
}
|
||||
|
||||
private void OnDash(InputAction.CallbackContext context)
|
||||
{
|
||||
if (CanDash())
|
||||
{
|
||||
StartCoroutine(DashCoroutine());
|
||||
}
|
||||
}
|
||||
|
||||
private bool CanDash()
|
||||
{
|
||||
return _playerData.IsDashEnabled && _isDashing == false && _isDashCooldown == false;
|
||||
}
|
||||
|
||||
private IEnumerator DashCoroutine()
|
||||
{
|
||||
_isDashing = true;
|
||||
_isDashCooldown = true;
|
||||
|
||||
OnDashing?.Invoke(_playerData.DashTime);
|
||||
|
||||
Vector3 dashVelocity = _currentDirection.normalized * _playerData.DashSpeed;
|
||||
_rigidbody.linearVelocity = dashVelocity;
|
||||
|
||||
yield return new WaitForSeconds(_playerData.DashTime);
|
||||
|
||||
_isDashing = false;
|
||||
|
||||
yield return new WaitForSeconds(_playerData.DashCooldown);
|
||||
_isDashCooldown = false;
|
||||
}
|
||||
|
||||
public Vector3 GetCurrentDirection() => _currentDirection;
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 06e836de83eb924449235839869a147c
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user