Merge pull request 'global_data_system' (#3) from global_data_system into develop
Reviewed-on: #3
This commit is contained in:
commit
c79d37a608
@ -15,20 +15,14 @@ MonoBehaviour:
|
||||
m_GroupName: GoogleSheetSo_Group
|
||||
m_GUID: 7fe0c33d351391a45a0ea3c93ecef42e
|
||||
m_SerializeEntries:
|
||||
- m_GUID: 3dee12c6902e0644fab1d0e2693857a8
|
||||
m_Address: ItemSo
|
||||
- m_GUID: 8261ff435a6e2484086e02e556c0ba93
|
||||
m_Address: FoodDataSo
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- GoogleSheetSo
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: b7e176e1cb8d76941af3b6344a4e1401
|
||||
m_Address: FoodSo
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- GoogleSheetSo
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: f38617ba14522db4d87bb7e10c280a2d
|
||||
m_Address: MonsterSo
|
||||
- m_GUID: c2be393a39588b647bacdd69f47f677d
|
||||
m_Address: ItemDataSo
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- GoogleSheetSo
|
||||
|
@ -14,7 +14,12 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_GroupName: GoogleSheetSprite_Group
|
||||
m_GUID: 30e7f67fe9aaa7849a34c9b6e2bc53ae
|
||||
m_SerializeEntries: []
|
||||
m_SerializeEntries:
|
||||
- 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:
|
||||
|
@ -4,9 +4,9 @@ SpriteAtlasImporter:
|
||||
externalObjects: {}
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
anisoLevel: 1
|
||||
compressionQuality: 50
|
||||
maxTextureSize: 2048
|
||||
anisoLevel: 0
|
||||
compressionQuality: 0
|
||||
maxTextureSize: 0
|
||||
textureCompression: 0
|
||||
filterMode: 1
|
||||
generateMipMaps: 0
|
||||
@ -17,10 +17,10 @@ SpriteAtlasImporter:
|
||||
packingSettings:
|
||||
serializedVersion: 2
|
||||
padding: 4
|
||||
blockOffset: 1
|
||||
blockOffset: 0
|
||||
allowAlphaSplitting: 0
|
||||
enableRotation: 1
|
||||
enableTightPacking: 1
|
||||
enableRotation: 0
|
||||
enableTightPacking: 0
|
||||
enableAlphaDilation: 0
|
||||
secondaryTextureSettings: {}
|
||||
variantMultiplier: 1
|
||||
|
@ -48,7 +48,7 @@ MonoBehaviour:
|
||||
_isAccessGoogleSheet: 1
|
||||
_googleSheetUrl: https://script.google.com/macros/s/AKfycbw8TRSl_OuY2S-RX0yvOJi1SqNqoflG0R3pWxk9GC9u_wvGQeuABZc0VH7YJ5lMrAl4/exec
|
||||
_namespace: DDD
|
||||
_availSheets: Food/Monster/Item
|
||||
_availSheets: FoodData/ItemData
|
||||
_generateFolderPath: /_DDD/_Scripts/GenerateGoogleSheet/AutoCreated
|
||||
_currentVersion: "1 - 2025-07-04 16:18:02 by \uB0A8\uD0DC\uAC74"
|
||||
_restoreIndex: 0
|
||||
|
@ -4692,6 +4692,18 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: GoogleSheetManager
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6289760680591803305, guid: 05aeb8078f8dc7c489b71a0ce5bc4fac, type: 3}
|
||||
propertyPath: _editorName
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6289760680591803305, guid: 05aeb8078f8dc7c489b71a0ce5bc4fac, type: 3}
|
||||
propertyPath: _currentVersion
|
||||
value: "2 - 2025-07-10 14:06:48 by \uB0A8\uD0DC\uAC74"
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6289760680591803305, guid: 05aeb8078f8dc7c489b71a0ce5bc4fac, type: 3}
|
||||
propertyPath: _refreshTrigger
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
@ -19573,7 +19585,7 @@ SpriteRenderer:
|
||||
m_Size: {x: 6.84, y: 4.86}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_WasSpriteAssigned: 0
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!4 &1555910286334263882
|
||||
@ -30976,7 +30988,7 @@ SpriteRenderer:
|
||||
m_Size: {x: 8, y: 3}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_WasSpriteAssigned: 0
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!210 &2810339226026076516
|
||||
@ -43140,7 +43152,7 @@ SpriteRenderer:
|
||||
m_Size: {x: 14.44, y: 8.6}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_WasSpriteAssigned: 0
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!210 &4335431399105516519
|
||||
@ -47226,7 +47238,7 @@ SpriteRenderer:
|
||||
m_Size: {x: 28.7, y: 5.6}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_WasSpriteAssigned: 0
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!4 &4774839203087077672
|
||||
|
@ -149,7 +149,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_persistent: 1
|
||||
_managerDefinition: {fileID: 11400000, guid: a98ebd2611b2e4e80a867f57fdc91fc9, type: 2}
|
||||
_managerDefinitionSo: {fileID: 11400000, guid: d8346bac7a0fdab419cca3193df2ca34, type: 2}
|
||||
--- !u!4 &1415192492
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -159,7 +159,7 @@ Transform:
|
||||
m_GameObject: {fileID: 1415192490}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 721.5473, y: 0, z: 201.61682}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
|
8
Assets/_DDD/_Scripts/AssetManagement.meta
Normal file
8
Assets/_DDD/_Scripts/AssetManagement.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 01a783bbf1998df4fa67164cfc433324
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
38
Assets/_DDD/_Scripts/AssetManagement/AssetManager.cs
Normal file
38
Assets/_DDD/_Scripts/AssetManagement/AssetManager.cs
Normal file
@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
public class AssetManager : Singleton<AssetManager>, IManager
|
||||
{
|
||||
public void Init()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public async void PostInit()
|
||||
{
|
||||
try
|
||||
{
|
||||
await Addressables.InitializeAsync().Task;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Assert(false, "Addressables initialization failed");
|
||||
}
|
||||
}
|
||||
|
||||
public static async Awaitable<T> LoadAsset<T>(string key) where T : UnityEngine.Object
|
||||
{
|
||||
var handle = Addressables.LoadAssetAsync<T>(key);
|
||||
await handle.Task;
|
||||
if (handle.Status == AsyncOperationStatus.Succeeded)
|
||||
return handle.Result;
|
||||
|
||||
Debug.LogError($"Addressable load failed : {key}");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 38667042b7dae844b813b6d15d63ec65
|
8
Assets/_DDD/_Scripts/CameraSystem.meta
Normal file
8
Assets/_DDD/_Scripts/CameraSystem.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0abd16944f70d9c41ab64299ec5b98ff
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/_DDD/_Scripts/GameCharacter.meta
Normal file
8
Assets/_DDD/_Scripts/GameCharacter.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4cf45ebd41833374f85e75b759783eb3
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
7
Assets/_DDD/_Scripts/GameCharacter/IGameCharacter.cs
Normal file
7
Assets/_DDD/_Scripts/GameCharacter/IGameCharacter.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace DDD
|
||||
{
|
||||
public interface IGameCharacter
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8651d2cc54cb48840be40c41a055ad32
|
@ -0,0 +1,7 @@
|
||||
namespace DDD
|
||||
{
|
||||
public interface IMovementConstraint
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 86d2fc3f0d2f489e8552cdbb8fe7425d
|
||||
timeCreated: 1752053109
|
8
Assets/_DDD/_Scripts/GameData.meta
Normal file
8
Assets/_DDD/_Scripts/GameData.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 83806d7f5b542da4d8d30a863e9bdbbc
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
39
Assets/_DDD/_Scripts/GameData/DataManager.cs
Normal file
39
Assets/_DDD/_Scripts/GameData/DataManager.cs
Normal file
@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
public class DataManager : Singleton<DataManager>, IManager
|
||||
{
|
||||
public ItemDataSo ItemDataSo { get; private set; }
|
||||
|
||||
public void Init()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public async void PostInit()
|
||||
{
|
||||
try
|
||||
{
|
||||
ItemDataSo = await AssetManager.LoadAsset<ItemDataSo>("ItemDataSo");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError($"So bind failed\n{e.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
// TODO : So가 늘어나는 경우 관리 방법 변경 필요성이 있음
|
||||
// GetItemType(id)
|
||||
// GetItemImage
|
||||
// GetItemName
|
||||
|
||||
public ItemType GetItemType(string key)
|
||||
{
|
||||
ItemData itemData = ItemDataSo.ItemDataList.FirstOrDefault(item => item.Id == key);
|
||||
return itemData?.ItemType ?? ItemType.None;
|
||||
}
|
||||
}
|
||||
}
|
2
Assets/_DDD/_Scripts/GameData/DataManager.cs.meta
Normal file
2
Assets/_DDD/_Scripts/GameData/DataManager.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 07beed0d64f351c4e9b01784eebf0498
|
47
Assets/_DDD/_Scripts/GameData/DataManager.prefab
Normal file
47
Assets/_DDD/_Scripts/GameData/DataManager.prefab
Normal file
@ -0,0 +1,47 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &4251080669997520799
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 9003561875116500446}
|
||||
- component: {fileID: 4889131746858770208}
|
||||
m_Layer: 0
|
||||
m_Name: DataManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &9003561875116500446
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4251080669997520799}
|
||||
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 &4889131746858770208
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4251080669997520799}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 07beed0d64f351c4e9b01784eebf0498, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_persistent: 1
|
7
Assets/_DDD/_Scripts/GameData/DataManager.prefab.meta
Normal file
7
Assets/_DDD/_Scripts/GameData/DataManager.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d90fdb17f0162334daadc6fc93e9a0e3
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
14
Assets/_DDD/_Scripts/GameFlow/GameFlowAssetsSo.asset
Normal file
14
Assets/_DDD/_Scripts/GameFlow/GameFlowAssetsSo.asset
Normal file
@ -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: 0}
|
||||
m_Name: GameFlowAssetsSo
|
||||
m_EditorClassIdentifier: Assembly-CSharp:DDD:GameFlowAssetsSo
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b7e176e1cb8d76941af3b6344a4e1401
|
||||
guid: 4fca93ffece40ff48973532398011d84
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
@ -1,7 +1,11 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
@ -14,47 +18,50 @@ public enum GameFlowState
|
||||
SettlementRestaurant = 3,
|
||||
}
|
||||
|
||||
public class GameFlowData : ScriptableObject
|
||||
public class GameFlowDataSo : ScriptableObject
|
||||
{
|
||||
public GameFlowState CurrentGameState;
|
||||
}
|
||||
|
||||
[CreateAssetMenu(fileName = "GameFlowSceneMapping", menuName = "GameFlow/GameFlowSceneMapping")]
|
||||
public class GameFlowSceneMapping : ScriptableObject
|
||||
|
||||
[CreateAssetMenu(fileName = "GameFlowAssetsSo", menuName = "GameFlow/GameFlowAssetsSo")]
|
||||
public class GameFlowAssetsSo : ScriptableObject
|
||||
{
|
||||
public Dictionary<GameFlowState, Scene> FlowToSceneMapping = new Dictionary<GameFlowState, Scene>();
|
||||
[ShowInInspector]
|
||||
public Dictionary<GameFlowState, List<string>> FlowItems = new();
|
||||
|
||||
[ShowInInspector]
|
||||
public Dictionary<GameFlowState, List<AssetReference>> FlowAssets = new();
|
||||
}
|
||||
|
||||
[CreateAssetMenu(fileName = "GameFlowSceneMappingSo", menuName = "GameFlow/GameFlowSceneMappingSo")]
|
||||
public class GameFlowSceneMappingSo : ScriptableObject
|
||||
{
|
||||
[ShowInInspector]
|
||||
public Dictionary<GameFlowState, Scene> FlowToSceneMapping = new();
|
||||
}
|
||||
|
||||
public class GameFlowManager : Singleton<GameFlowManager>, IManager
|
||||
{
|
||||
private GameFlowData _gameFlowData = null;
|
||||
|
||||
public GameFlowSceneMapping GameFlowSceneMapping;
|
||||
private GameFlowDataSo _gameFlowDataSo;
|
||||
public GameFlowAssetsSo GameFlowAssetsSo;
|
||||
public GameFlowSceneMappingSo GameFlowSceneMappingSo;
|
||||
|
||||
public void Init()
|
||||
{
|
||||
_gameFlowData = new GameFlowData();
|
||||
_gameFlowDataSo = ScriptableObject.CreateInstance<GameFlowDataSo>();
|
||||
}
|
||||
|
||||
public void PostInit()
|
||||
{
|
||||
SceneManager.Instance.OnSceneChanged += OnFlowSceneOpened;
|
||||
|
||||
if (IsGameStarted() == false)
|
||||
{
|
||||
Scene sceneToLoad;
|
||||
bool isSceneFound = GameFlowSceneMapping.FlowToSceneMapping.TryGetValue(_gameFlowData.CurrentGameState, out sceneToLoad);
|
||||
if (isSceneFound == false)
|
||||
{
|
||||
SceneManager.Instance.RequestSceneLoad(sceneToLoad);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Assert(false, "Scene not found!");
|
||||
}
|
||||
ChangeFlow(GameFlowState.ReadyForRestaurant);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsGameStarted() => _gameFlowData.CurrentGameState != GameFlowState.None;
|
||||
public bool IsGameStarted() => _gameFlowDataSo.CurrentGameState != GameFlowState.None;
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
@ -64,5 +71,96 @@ protected override void Awake()
|
||||
private void Start()
|
||||
{
|
||||
}
|
||||
|
||||
private bool CanChangeFlow(GameFlowState newFlowState)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void ChangeFlow(GameFlowState newFlowState)
|
||||
{
|
||||
StartCoroutine(ChangeFlowCoroutine(newFlowState));
|
||||
}
|
||||
|
||||
private IEnumerator ChangeFlowCoroutine(GameFlowState newFlowState)
|
||||
{
|
||||
if (CanChangeFlow(newFlowState) == false)
|
||||
{
|
||||
Debug.LogError("Can't change flow");
|
||||
yield break;
|
||||
}
|
||||
|
||||
EndCurrentFlow();
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void EndCurrentFlow()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public IEnumerator ReadyNewFlow(GameFlowState newFlowState)
|
||||
{
|
||||
OpenFlowScene(newFlowState);
|
||||
|
||||
// Ready Assets
|
||||
if (GameFlowAssetsSo.FlowItems.ContainsKey(newFlowState))
|
||||
{
|
||||
List<string> Items = GameFlowAssetsSo.FlowItems[newFlowState];
|
||||
// Addressables.LoadAssetsAsync(Items, null);
|
||||
// TODO : 여러 에셋 로드하고, 콜백 받을때까지 기다리기
|
||||
|
||||
// Wait
|
||||
}
|
||||
|
||||
if (GameFlowAssetsSo.FlowAssets.ContainsKey(newFlowState))
|
||||
{
|
||||
//List<AssetReference> Assets = GameFlowAssets.FlowItems[newFlowState];
|
||||
// Addressables.LoadAssetsAsync(Assets, )
|
||||
// TODO : 여러 에셋 로드하고, 콜백 받을때까지 기다리기
|
||||
|
||||
// Wait
|
||||
}
|
||||
|
||||
// Ready Scene
|
||||
GetFlowScene(newFlowState, out var flowScene);
|
||||
yield return new WaitUntil(() => _currentScene == flowScene );
|
||||
|
||||
StartFlow();
|
||||
}
|
||||
|
||||
public void OpenFlowScene(GameFlowState newFlowState)
|
||||
{
|
||||
if (GetFlowScene(newFlowState, out var sceneToLoad))
|
||||
{
|
||||
SceneManager.Instance.RequestSceneLoad(sceneToLoad);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Assert(false, "Scene not found!");
|
||||
}
|
||||
}
|
||||
|
||||
private Scene _currentScene;
|
||||
public void OnFlowSceneOpened(Scene newScene)
|
||||
{
|
||||
_currentScene = newScene;
|
||||
}
|
||||
|
||||
public bool GetFlowScene(GameFlowState flowState, out Scene scene)
|
||||
{
|
||||
if (GameFlowSceneMappingSo.FlowToSceneMapping.TryGetValue(flowState, out scene))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void StartFlow()
|
||||
{
|
||||
// Broadcast new flow started
|
||||
}
|
||||
}
|
||||
}
|
@ -45,3 +45,10 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_persistent: 1
|
||||
GameFlowSceneMapping: {fileID: 0}
|
||||
FlowAsset:
|
||||
m_AssetGUID: e15933f76da90e742866563b5cd9e45f
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 1
|
||||
|
14
Assets/_DDD/_Scripts/GameFlow/GameFlowSceneMappingSo.asset
Normal file
14
Assets/_DDD/_Scripts/GameFlow/GameFlowSceneMappingSo.asset
Normal file
@ -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: 0}
|
||||
m_Name: GameFlowSceneMappingSo
|
||||
m_EditorClassIdentifier: Assembly-CSharp:DDD:GameFlowSceneMappingSo
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3dee12c6902e0644fab1d0e2693857a8
|
||||
guid: 11d1c2609268ac14fa627958ee097fac
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
@ -1,21 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
[CreateAssetMenu(fileName = "ManagerDefinition", menuName = "GameFramework/ManagerDefinition")]
|
||||
public class ManagerDefinition : ScriptableObject
|
||||
[CreateAssetMenu(fileName = "ManagerDefinitionSo", menuName = "GameFramework/ManagerDefinitionSo")]
|
||||
public class ManagerDefinitionSo : ScriptableObject
|
||||
{
|
||||
public List<Singleton> ManagerClasses;
|
||||
}
|
||||
|
||||
public class GameManager : Singleton<GameManager>
|
||||
{
|
||||
public ManagerDefinition _managerDefinition;
|
||||
public List<Singleton> _ManagerInstances;
|
||||
[SerializeField]
|
||||
private ManagerDefinitionSo _managerDefinitionSo;
|
||||
|
||||
private List<Singleton> _managerInstances;
|
||||
|
||||
protected override void OnAwake()
|
||||
{
|
||||
@ -24,16 +23,18 @@ protected override void OnAwake()
|
||||
|
||||
// Entry Scene에서 뭘 해야할까?
|
||||
// 매니저 초기화
|
||||
foreach (var managerObject in _managerDefinition.ManagerClasses)
|
||||
_managerInstances = new List<Singleton>(_managerDefinitionSo.ManagerClasses.Count);
|
||||
|
||||
foreach (var managerObject in _managerDefinitionSo.ManagerClasses)
|
||||
{
|
||||
var managerInstance = Instantiate(managerObject);
|
||||
_ManagerInstances.Add(managerInstance);
|
||||
_managerInstances.Add(managerInstance);
|
||||
if (managerInstance is IManager manager)
|
||||
{
|
||||
manager.Init();
|
||||
}
|
||||
}
|
||||
foreach (var managerInstance in _ManagerInstances)
|
||||
foreach (var managerInstance in _managerInstances)
|
||||
{
|
||||
if (managerInstance is IManager manager)
|
||||
{
|
||||
|
@ -10,8 +10,9 @@ MonoBehaviour:
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 0}
|
||||
m_Name: ManagerDefinition
|
||||
m_EditorClassIdentifier: Assembly-CSharp:DDD:ManagerDefinition
|
||||
m_Name: ManagerDefinitionSo
|
||||
m_EditorClassIdentifier: Assembly-CSharp:DDD:ManagerDefinitionSo
|
||||
ManagerClasses:
|
||||
- {fileID: 6471498998539637564, guid: fa2ad62c75b1549f09597e47ed5f7cfb, type: 3}
|
||||
- {fileID: 7665229218737596710, guid: 71b177c2a18314c588da30429451666a, type: 3}
|
||||
- {fileID: 6471498998539637564, guid: fa2ad62c75b1549f09597e47ed5f7cfb, type: 3}
|
||||
- {fileID: 4889131746858770208, guid: d90fdb17f0162334daadc6fc93e9a0e3, type: 3}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a98ebd2611b2e4e80a867f57fdc91fc9
|
||||
guid: d8346bac7a0fdab419cca3193df2ca34
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
@ -35,6 +35,8 @@ public class SceneDefinition : ScriptableObject
|
||||
|
||||
public class SceneManager : Singleton<SceneManager>, IManager
|
||||
{
|
||||
public Action<Scene> OnSceneChanged;
|
||||
|
||||
public void Init()
|
||||
{
|
||||
// Load Scene Data
|
||||
@ -142,7 +144,7 @@ public async Task ChangeScene(SceneType sceneType)
|
||||
|
||||
// 씬 로딩 후 초기화 작업
|
||||
CameraManager.Instance.ChangeScene(sceneType);
|
||||
KeyManager.Instance.ChangeScene(sceneType);
|
||||
InputManager.Instance.ChangeScene(sceneType);
|
||||
|
||||
CurrentSceneType = sceneType;
|
||||
|
||||
|
@ -0,0 +1,77 @@
|
||||
{
|
||||
"$개요": [
|
||||
{
|
||||
"": "시트 생성"
|
||||
}
|
||||
],
|
||||
"FoodData": [
|
||||
{
|
||||
"Id:string": "식별ID",
|
||||
"Name:string": "이름",
|
||||
"Cookware_Enum": "요리도구",
|
||||
"Ingredient1:string": "재료1",
|
||||
"Ingredient2:string": "재료2",
|
||||
"Taste1:Taste_Enum": "맛1",
|
||||
"Taste2:Taste_Enum": "맛2",
|
||||
"Sprite:Sprite": "Addressable 이미지 이름"
|
||||
},
|
||||
{
|
||||
"Id:string": "Food001",
|
||||
"Name:string": "햇빛수프",
|
||||
"Cookware_Enum": "Pot",
|
||||
"Ingredient1:string": "극락쌀",
|
||||
"Ingredient2:string": "햇빛당근",
|
||||
"Taste1:Taste_Enum": "Bitter",
|
||||
"Taste2:Taste_Enum": "Sweet",
|
||||
"Sprite:Sprite": "Gold"
|
||||
},
|
||||
{
|
||||
"Id:string": "Food002",
|
||||
"Name:string": "B",
|
||||
"Cookware_Enum": "FryingPan",
|
||||
"Ingredient1:string": 1,
|
||||
"Ingredient2:string": 1,
|
||||
"Taste1:Taste_Enum": "Spicy",
|
||||
"Taste2:Taste_Enum": "Bitter",
|
||||
"Sprite:Sprite": ""
|
||||
},
|
||||
{
|
||||
"Id:string": "Food003",
|
||||
"Name:string": "C",
|
||||
"Cookware_Enum": "Pot",
|
||||
"Ingredient1:string": 2,
|
||||
"Ingredient2:string": 2,
|
||||
"Taste1:Taste_Enum": "Fresh",
|
||||
"Taste2:Taste_Enum": "None",
|
||||
"Sprite:Sprite": ""
|
||||
},
|
||||
{
|
||||
"Id:string": "Food004",
|
||||
"Name:string": "D",
|
||||
"Cookware_Enum": "Plating",
|
||||
"Ingredient1:string": 3,
|
||||
"Ingredient2:string": 3,
|
||||
"Taste1:Taste_Enum": " ",
|
||||
"Taste2:Taste_Enum": "Salty",
|
||||
"Sprite:Sprite": "Gold"
|
||||
}
|
||||
],
|
||||
"ItemData": [
|
||||
{
|
||||
"Id": "식별번호",
|
||||
"ItemType_Enum": "아이템타입"
|
||||
},
|
||||
{
|
||||
"Id": "Item001",
|
||||
"ItemType_Enum": "Food"
|
||||
},
|
||||
{
|
||||
"Id": "Item002",
|
||||
"ItemType_Enum": "Prop"
|
||||
},
|
||||
{
|
||||
"Id": "Item003",
|
||||
"ItemType_Enum": "Interactable"
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5a1f5fa4ff4feee4e91087c012fd82bf
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -5,7 +5,7 @@
|
||||
namespace DDD
|
||||
{
|
||||
[Serializable]
|
||||
public class Food
|
||||
public class FoodData
|
||||
{
|
||||
/// <summary>식별ID</summary>
|
||||
[Tooltip("식별ID")]
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 75468224b7088a34b861c056d4528fec
|
@ -0,0 +1,12 @@
|
||||
// <auto-generated> File: FoodDataSo.cs
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
[CreateAssetMenu(fileName = "FoodDataSo", menuName = "GoogleSheet/FoodDataSo")]
|
||||
public class FoodDataSo : ScriptableObject
|
||||
{
|
||||
public List<FoodData> FoodDataList;
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 23d26ce5ffaf3e44bb79a4d77ead320d
|
@ -5,27 +5,15 @@
|
||||
namespace DDD
|
||||
{
|
||||
[Serializable]
|
||||
public class Item
|
||||
public class ItemData
|
||||
{
|
||||
/// <summary>식별번호</summary>
|
||||
[Tooltip("식별번호")]
|
||||
public string Id;
|
||||
|
||||
/// <summary>이름</summary>
|
||||
[Tooltip("이름")]
|
||||
public string Name;
|
||||
|
||||
/// <summary>아이템타입</summary>
|
||||
[Tooltip("아이템타입")]
|
||||
public ItemType ItemType;
|
||||
|
||||
/// <summary>셀크기X</summary>
|
||||
[Tooltip("셀크기X")]
|
||||
public int CellSizeX;
|
||||
|
||||
/// <summary>셀크기Y</summary>
|
||||
[Tooltip("셀크기Y")]
|
||||
public int CellSizeY;
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b45493673e890264c89efa652ddd00da
|
@ -0,0 +1,12 @@
|
||||
// <auto-generated> File: ItemDataSo.cs
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
[CreateAssetMenu(fileName = "ItemDataSo", menuName = "GoogleSheet/ItemDataSo")]
|
||||
public class ItemDataSo : ScriptableObject
|
||||
{
|
||||
public List<ItemData> ItemDataList;
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a9a45b736c555724bbc4b3a46116b356
|
@ -26,9 +26,9 @@ public enum Taste
|
||||
public enum ItemType
|
||||
{
|
||||
None = 0,
|
||||
Floor = 1,
|
||||
Furniture = 2,
|
||||
WallMount = 3,
|
||||
Food = 1,
|
||||
Prop = 2,
|
||||
Interactable = 3,
|
||||
}
|
||||
|
||||
}
|
@ -4,7 +4,7 @@
|
||||
"": "시트 생성"
|
||||
}
|
||||
],
|
||||
"Food": [
|
||||
"FoodData": [
|
||||
{
|
||||
"Id:string": "식별ID",
|
||||
"Name:string": "이름",
|
||||
@ -56,61 +56,22 @@
|
||||
"Sprite:Sprite": "Gold"
|
||||
}
|
||||
],
|
||||
"Monster": [
|
||||
"ItemData": [
|
||||
{
|
||||
"Id": "식별번호",
|
||||
"Name": "이름",
|
||||
"T1": "테스트1"
|
||||
},
|
||||
{
|
||||
"Id": "Test001",
|
||||
"Name": "A",
|
||||
"T1": 1
|
||||
},
|
||||
{
|
||||
"Id": "Test002",
|
||||
"Name": "B",
|
||||
"T1": 2
|
||||
},
|
||||
{
|
||||
"Id": "Test003",
|
||||
"Name": "C",
|
||||
"T1": 3
|
||||
},
|
||||
{
|
||||
"Id": "Test004",
|
||||
"Name": "D",
|
||||
"T1": 4
|
||||
}
|
||||
],
|
||||
"Item": [
|
||||
{
|
||||
"Id": "식별번호",
|
||||
"Name": "이름",
|
||||
"ItemType_Enum": "아이템타입",
|
||||
"CellSizeX:int": "셀크기X",
|
||||
"CellSizeY:int": "셀크기Y"
|
||||
"ItemType_Enum": "아이템타입"
|
||||
},
|
||||
{
|
||||
"Id": "Item001",
|
||||
"Name": "나무장판",
|
||||
"ItemType_Enum": "Floor",
|
||||
"CellSizeX:int": 1,
|
||||
"CellSizeY:int": 1
|
||||
"ItemType_Enum": "Food"
|
||||
},
|
||||
{
|
||||
"Id": "Item002",
|
||||
"Name": "테이블",
|
||||
"ItemType_Enum": "Furniture",
|
||||
"CellSizeX:int": 2,
|
||||
"CellSizeY:int": 2
|
||||
"ItemType_Enum": "Prop"
|
||||
},
|
||||
{
|
||||
"Id": "Item003",
|
||||
"Name": "전등",
|
||||
"ItemType_Enum": "WallMount",
|
||||
"CellSizeX:int": "",
|
||||
"CellSizeY:int": ""
|
||||
"ItemType_Enum": "Interactable"
|
||||
}
|
||||
]
|
||||
}
|
@ -91,4 +91,32 @@ MonoBehaviour:
|
||||
2\n },\n {\n \"Id\": \"Item003\",\n \"Name\": \"\uC804\uB4F1\",\n
|
||||
\"ItemType_Enum\": \"WallMount\",\n \"CellSizeX:int\": \"\",\n \"CellSizeY:int\":
|
||||
\"\"\n }\n ]\n}"
|
||||
- Editor: "\uB0A8\uD0DC\uAC74"
|
||||
Timestamp: 2025-07-10 14:06:48
|
||||
JsonSnapshot: "{\n \"$\uAC1C\uC694\": [\n {\n \"\": \"\uC2DC\uD2B8 \uC0DD\uC131\"\n
|
||||
}\n ],\n \"FoodData\": [\n {\n \"Id:string\": \"\uC2DD\uBCC4ID\",\n
|
||||
\"Name:string\": \"\uC774\uB984\",\n \"Cookware_Enum\": \"\uC694\uB9AC\uB3C4\uAD6C\",\n
|
||||
\"Ingredient1:string\": \"\uC7AC\uB8CC1\",\n \"Ingredient2:string\": \"\uC7AC\uB8CC2\",\n
|
||||
\"Taste1:Taste_Enum\": \"\uB9DB1\",\n \"Taste2:Taste_Enum\": \"\uB9DB2\",\n
|
||||
\"Sprite:Sprite\": \"Addressable \uC774\uBBF8\uC9C0 \uC774\uB984\"\n },\n
|
||||
{\n \"Id:string\": \"Food001\",\n \"Name:string\": \"\uD587\uBE5B\uC218\uD504\",\n
|
||||
\"Cookware_Enum\": \"Pot\",\n \"Ingredient1:string\": \"\uADF9\uB77D\uC300\",\n
|
||||
\"Ingredient2:string\": \"\uD587\uBE5B\uB2F9\uADFC\",\n \"Taste1:Taste_Enum\":
|
||||
\"Bitter\",\n \"Taste2:Taste_Enum\": \"Sweet\",\n \"Sprite:Sprite\":
|
||||
\"Gold\"\n },\n {\n \"Id:string\": \"Food002\",\n \"Name:string\":
|
||||
\"B\",\n \"Cookware_Enum\": \"FryingPan\",\n \"Ingredient1:string\":
|
||||
1,\n \"Ingredient2:string\": 1,\n \"Taste1:Taste_Enum\": \"Spicy\",\n
|
||||
\"Taste2:Taste_Enum\": \"Bitter\",\n \"Sprite:Sprite\": \"\"\n },\n
|
||||
{\n \"Id:string\": \"Food003\",\n \"Name:string\": \"C\",\n
|
||||
\"Cookware_Enum\": \"Pot\",\n \"Ingredient1:string\": 2,\n \"Ingredient2:string\":
|
||||
2,\n \"Taste1:Taste_Enum\": \"Fresh\",\n \"Taste2:Taste_Enum\": \"None\",\n
|
||||
\"Sprite:Sprite\": \"\"\n },\n {\n \"Id:string\": \"Food004\",\n
|
||||
\"Name:string\": \"D\",\n \"Cookware_Enum\": \"Plating\",\n \"Ingredient1:string\":
|
||||
3,\n \"Ingredient2:string\": 3,\n \"Taste1:Taste_Enum\": \" \",\n
|
||||
\"Taste2:Taste_Enum\": \"Salty\",\n \"Sprite:Sprite\": \"Gold\"\n }\n
|
||||
],\n \"ItemData\": [\n {\n \"Id\": \"\uC2DD\uBCC4\uBC88\uD638\",\n
|
||||
\"ItemType_Enum\": \"\uC544\uC774\uD15C\uD0C0\uC785\"\n },\n {\n
|
||||
\"Id\": \"Item001\",\n \"ItemType_Enum\": \"Food\"\n },\n {\n
|
||||
\"Id\": \"Item002\",\n \"ItemType_Enum\": \"Prop\"\n },\n {\n
|
||||
\"Id\": \"Item003\",\n \"ItemType_Enum\": \"Interactable\"\n }\n ]\n}"
|
||||
MaxLogs: 100
|
@ -9,10 +9,10 @@ MonoBehaviour:
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 68f7086db4e68fc4d913633d06d803f0, type: 3}
|
||||
m_Name: FoodSo
|
||||
m_Script: {fileID: 11500000, guid: 23d26ce5ffaf3e44bb79a4d77ead320d, type: 3}
|
||||
m_Name: FoodDataSo
|
||||
m_EditorClassIdentifier:
|
||||
FoodList:
|
||||
FoodDataList:
|
||||
- Id: Food001
|
||||
Name: "\uD587\uBE5B\uC218\uD504"
|
||||
Cookware: 1
|
||||
@ -20,7 +20,7 @@ MonoBehaviour:
|
||||
Ingredient2: "\uD587\uBE5B\uB2F9\uADFC"
|
||||
Taste1: 1
|
||||
Taste2: 2
|
||||
Sprite: {fileID: 21300000, guid: e15933f76da90e742866563b5cd9e45f, type: 3}
|
||||
Sprite: {fileID: 0}
|
||||
- Id: Food002
|
||||
Name: B
|
||||
Cookware: 2
|
||||
@ -44,4 +44,4 @@ MonoBehaviour:
|
||||
Ingredient2: 3
|
||||
Taste1: 5
|
||||
Taste2: 6
|
||||
Sprite: {fileID: 21300000, guid: e15933f76da90e742866563b5cd9e45f, type: 3}
|
||||
Sprite: {fileID: 0}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f38617ba14522db4d87bb7e10c280a2d
|
||||
guid: 8261ff435a6e2484086e02e556c0ba93
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
@ -9,22 +9,13 @@ MonoBehaviour:
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 7b5deaa05a95b394fb6f6fd6a450e445, type: 3}
|
||||
m_Name: ItemSo
|
||||
m_Script: {fileID: 11500000, guid: a9a45b736c555724bbc4b3a46116b356, type: 3}
|
||||
m_Name: ItemDataSo
|
||||
m_EditorClassIdentifier:
|
||||
ItemList:
|
||||
ItemDataList:
|
||||
- Id: Item001
|
||||
Name: "\uB098\uBB34\uC7A5\uD310"
|
||||
ItemType: 1
|
||||
CellSizeX: 1
|
||||
CellSizeY: 1
|
||||
- Id: Item002
|
||||
Name: "\uD14C\uC774\uBE14"
|
||||
ItemType: 2
|
||||
CellSizeX: 2
|
||||
CellSizeY: 2
|
||||
- Id: Item003
|
||||
Name: "\uC804\uB4F1"
|
||||
ItemType: 3
|
||||
CellSizeX: 0
|
||||
CellSizeY: 0
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c2be393a39588b647bacdd69f47f677d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -9,6 +9,7 @@
|
||||
using UnityEngine;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Linq;
|
||||
using DDD;
|
||||
using JetBrains.Annotations;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEditor;
|
||||
@ -88,6 +89,8 @@ public static async Task<T> LoadSo<T>() where T : ScriptableObject
|
||||
[Button("데이터 최신화"), EnableIf(nameof(CanFetchData))]
|
||||
private async Task FetchGoogleSheet()
|
||||
{
|
||||
|
||||
|
||||
_availSheetArray = _availSheets.Split('/');
|
||||
|
||||
var prevLog = AssetDatabase.LoadAssetAtPath<GoogleSheetChangeLog>(ChangeLogAssetPath);
|
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 07d32adeac9e96e4ca9cc90de1b3fa4b
|
@ -1,12 +0,0 @@
|
||||
// <auto-generated> File: FoodSo.cs
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
[CreateAssetMenu(fileName = "FoodSo", menuName = "GoogleSheet/FoodSo")]
|
||||
public class FoodSo : ScriptableObject
|
||||
{
|
||||
public List<Food> FoodList;
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 68f7086db4e68fc4d913633d06d803f0
|
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ae55dc0aec9727b4a8cfbb29172ad176
|
@ -1,12 +0,0 @@
|
||||
// <auto-generated> File: ItemSo.cs
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
[CreateAssetMenu(fileName = "ItemSo", menuName = "GoogleSheet/ItemSo")]
|
||||
public class ItemSo : ScriptableObject
|
||||
{
|
||||
public List<Item> ItemList;
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7b5deaa05a95b394fb6f6fd6a450e445
|
@ -1,23 +0,0 @@
|
||||
// <auto-generated>
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
[Serializable]
|
||||
public class Monster
|
||||
{
|
||||
/// <summary>식별번호</summary>
|
||||
[Tooltip("식별번호")]
|
||||
public string Id;
|
||||
|
||||
/// <summary>이름</summary>
|
||||
[Tooltip("이름")]
|
||||
public string Name;
|
||||
|
||||
/// <summary>테스트1</summary>
|
||||
[Tooltip("테스트1")]
|
||||
public int T1;
|
||||
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0b53849f7f9a9ad4f85656f3563afb61
|
@ -1,12 +0,0 @@
|
||||
// <auto-generated> File: MonsterSo.cs
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
[CreateAssetMenu(fileName = "MonsterSo", menuName = "GoogleSheet/MonsterSo")]
|
||||
public class MonsterSo : ScriptableObject
|
||||
{
|
||||
public List<Monster> MonsterList;
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7e1500a3fc388674fa8ef2759d5d1c95
|
@ -1,27 +0,0 @@
|
||||
%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: 7e1500a3fc388674fa8ef2759d5d1c95, type: 3}
|
||||
m_Name: MonsterSo
|
||||
m_EditorClassIdentifier:
|
||||
MonsterList:
|
||||
- Id: Test001
|
||||
Name: A
|
||||
T1: 1
|
||||
- Id: Test002
|
||||
Name: B
|
||||
T1: 2
|
||||
- Id: Test003
|
||||
Name: C
|
||||
T1: 3
|
||||
- Id: Test004
|
||||
Name: D
|
||||
T1: 4
|
8
Assets/_DDD/_Scripts/InputSystem.meta
Normal file
8
Assets/_DDD/_Scripts/InputSystem.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aed2f49e843ad9a4a8dbbc13532b7183
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
@ -9,15 +10,17 @@ public enum InputActionMaps
|
||||
Ui = 1,
|
||||
Restaurant = 2,
|
||||
}
|
||||
|
||||
public static class RestaurantActions
|
||||
|
||||
[Flags]
|
||||
public enum RestaurantActions
|
||||
{
|
||||
public const string Move = "Move";
|
||||
public const string Dash = "Dash";
|
||||
public const string Interact = "Interact";
|
||||
None = 0,
|
||||
Move = 1<<0,
|
||||
Dash = 1<<1,
|
||||
Interact = 1<<2
|
||||
}
|
||||
|
||||
public class KeyManager : Singleton<KeyManager>
|
||||
public class InputManager : Singleton<InputManager>
|
||||
{
|
||||
private PlayerInput _currentPlayerInput;
|
||||
|
@ -0,0 +1,255 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &5259510642736920361
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1761643478070701343}
|
||||
- component: {fileID: 5176902543201676162}
|
||||
- component: {fileID: 5246526151924390639}
|
||||
- component: {fileID: 3365694194251356714}
|
||||
- component: {fileID: 127430239903465757}
|
||||
- component: {fileID: 3095965496140440094}
|
||||
m_Layer: 0
|
||||
m_Name: BaseRestaurantCharacter
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1761643478070701343
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5259510642736920361}
|
||||
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: 1111036208394089843}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!54 &5176902543201676162
|
||||
Rigidbody:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5259510642736920361}
|
||||
serializedVersion: 5
|
||||
m_Mass: 1
|
||||
m_LinearDamping: 0
|
||||
m_AngularDamping: 0.05
|
||||
m_CenterOfMass: {x: 0, y: 0, z: 0}
|
||||
m_InertiaTensor: {x: 1, y: 1, z: 1}
|
||||
m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ImplicitCom: 1
|
||||
m_ImplicitTensor: 1
|
||||
m_UseGravity: 0
|
||||
m_IsKinematic: 0
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 116
|
||||
m_CollisionDetection: 1
|
||||
--- !u!136 &5246526151924390639
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5259510642736920361}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 0
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.2
|
||||
m_Height: 0.1
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.1, z: 0}
|
||||
--- !u!114 &3365694194251356714
|
||||
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: 061fa444069fcd74c884c1b3379c41b8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &127430239903465757
|
||||
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: 38cb67223546879468e9c0655893e025, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &3095965496140440094
|
||||
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: e20368314a3139f4fb4b4e35af9fcf98, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &6791841979869644848
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1111036208394089843}
|
||||
- component: {fileID: 5817391387681993290}
|
||||
- component: {fileID: 8683566178618629536}
|
||||
- component: {fileID: 1741467189652270979}
|
||||
m_Layer: 0
|
||||
m_Name: VisualLook
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1111036208394089843
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6791841979869644848}
|
||||
serializedVersion: 2
|
||||
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: 1761643478070701343}
|
||||
m_LocalEulerAnglesHint: {x: 40, y: 0, z: 0}
|
||||
--- !u!33 &5817391387681993290
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6791841979869644848}
|
||||
m_Mesh: {fileID: 0}
|
||||
--- !u!23 &8683566178618629536
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6791841979869644848}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 288333d9c9df2d84cadf3b48d918ebdb, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 5
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!114 &1741467189652270979
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6791841979869644848}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d247ba06193faa74d9335f5481b2b56c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
skeletonDataAsset: {fileID: 0}
|
||||
initialSkinName: Basic
|
||||
fixPrefabOverrideViaMeshFilter: 2
|
||||
initialFlipX: 0
|
||||
initialFlipY: 0
|
||||
updateWhenInvisible: 3
|
||||
separatorSlotNames: []
|
||||
zSpacing: 0
|
||||
useClipping: 1
|
||||
immutableTriangles: 0
|
||||
pmaVertexColors: 1
|
||||
clearStateOnDisable: 0
|
||||
tintBlack: 0
|
||||
singleSubmesh: 0
|
||||
fixDrawOrder: 0
|
||||
addNormals: 0
|
||||
calculateTangents: 0
|
||||
maskInteraction: 0
|
||||
maskMaterials:
|
||||
materialsMaskDisabled: []
|
||||
materialsInsideMask: []
|
||||
materialsOutsideMask: []
|
||||
disableRenderingOnOverride: 1
|
||||
physicsPositionInheritanceFactor: {x: 1, y: 1}
|
||||
physicsRotationInheritanceFactor: 1
|
||||
physicsMovementRelativeTo: {fileID: 0}
|
||||
updateTiming: 1
|
||||
unscaledTime: 0
|
||||
_animationName:
|
||||
loop: 1
|
||||
timeScale: 1
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3db3fc62639929c4ba6031ca4ae6600c
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user