폴더 정리
This commit is contained in:
parent
13c4f4be7c
commit
4b3e6187ff
@ -118,6 +118,7 @@ MonoBehaviour:
|
||||
- Locale-en
|
||||
- Locale-ja
|
||||
- Preload
|
||||
- AnimatorController
|
||||
m_SchemaTemplates: []
|
||||
m_GroupTemplateObjects:
|
||||
- {fileID: 11400000, guid: f804fe78e7005554f9ba60273aade35b, type: 2}
|
||||
|
@ -15,6 +15,12 @@ MonoBehaviour:
|
||||
m_GroupName: Group
|
||||
m_GUID: 30e7f67fe9aaa7849a34c9b6e2bc53ae
|
||||
m_SerializeEntries:
|
||||
- m_GUID: 077fbb30d2367574db4211e2945acda0
|
||||
m_Address: TodayMenuSlotUi
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- AnimatorController
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 0912c3de85fd61848a41575faa2794ed
|
||||
m_Address: CreateEnvironmentSo
|
||||
m_ReadOnly: 0
|
||||
@ -83,6 +89,12 @@ MonoBehaviour:
|
||||
m_SerializedLabels:
|
||||
- Atlas
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 83afdd7c8e0232443a83b09a90d0d3b1
|
||||
m_Address: InventorySlotUi
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- AnimatorController
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 8c4fcb278b09f944cbfa342ace27fcd4
|
||||
m_Address: RestaurantManagementSo
|
||||
m_ReadOnly: 0
|
||||
|
@ -80,3 +80,14 @@ MonoBehaviour:
|
||||
LabelMode: 1
|
||||
simplified: 0
|
||||
addressReplacement: ${asset}
|
||||
- path: Assets/_DDD/_Addressables/.*/(?<asset>.*)\.controller
|
||||
matchType: 1
|
||||
groupName:
|
||||
groupTemplate: {fileID: 11400000, guid: f804fe78e7005554f9ba60273aade35b, type: 2}
|
||||
groupTemplateApplicationMode: 0
|
||||
labelRefs: []
|
||||
dynamicLabels:
|
||||
- AnimatorController
|
||||
LabelMode: 1
|
||||
simplified: 0
|
||||
addressReplacement: ${asset}
|
||||
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,31 @@
|
||||
%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: f1b3b4b945939a54ea0b23d3396115fb, type: 3}
|
||||
m_Name: Coral_SkeletonData
|
||||
m_EditorClassIdentifier:
|
||||
atlasAssets:
|
||||
- {fileID: 11400000, guid: 4b63608e90c81ff4eb6b5247a7abb43c, type: 2}
|
||||
scale: 0.01
|
||||
skeletonJSON: {fileID: 4900000, guid: 159fde15a1727d342a4e7879a40e732b, type: 3}
|
||||
isUpgradingBlendModeMaterials: 0
|
||||
blendModeMaterials:
|
||||
requiresBlendModeMaterials: 0
|
||||
applyAdditiveMaterial: 1
|
||||
additiveMaterials: []
|
||||
multiplyMaterials: []
|
||||
screenMaterials: []
|
||||
skeletonDataModifiers: []
|
||||
fromAnimation: []
|
||||
toAnimation: []
|
||||
duration: []
|
||||
defaultMix: 0.2
|
||||
controller: {fileID: 0}
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6b5bd0b2f566ab747acd71c481b9275b
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,31 @@
|
||||
%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: f1b3b4b945939a54ea0b23d3396115fb, type: 3}
|
||||
m_Name: SummerGrass01_SkeletonData
|
||||
m_EditorClassIdentifier:
|
||||
atlasAssets:
|
||||
- {fileID: 11400000, guid: aadc67f7d8a526d4ba2fcb4eb3cad714, type: 2}
|
||||
scale: 0.01
|
||||
skeletonJSON: {fileID: 4900000, guid: a5dce57b366f9e248a188654bb14632f, type: 3}
|
||||
isUpgradingBlendModeMaterials: 0
|
||||
blendModeMaterials:
|
||||
requiresBlendModeMaterials: 0
|
||||
applyAdditiveMaterial: 1
|
||||
additiveMaterials: []
|
||||
multiplyMaterials: []
|
||||
screenMaterials: []
|
||||
skeletonDataModifiers: []
|
||||
fromAnimation: []
|
||||
toAnimation: []
|
||||
duration: []
|
||||
defaultMix: 0.2
|
||||
controller: {fileID: 0}
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4d7570cdeb5cf2f41b777568d866a4fe
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 83afdd7c8e0232443a83b09a90d0d3b1
|
||||
guid: d2637777b5909ff43bfb2d245ed4ab1d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 9100000
|
||||
|
8
Assets/_DDD/_Addressables/AnimationController.meta
Normal file
8
Assets/_DDD/_Addressables/AnimationController.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d6296adce6b94724e85ac36ef41aa1c6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 83afdd7c8e0232443a83b09a90d0d3b1
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 077fbb30d2367574db4211e2945acda0
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -610,7 +610,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: -32, y: -32}
|
||||
m_SizeDelta: {x: -40, y: -40}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3518282537249179397
|
||||
CanvasRenderer:
|
||||
|
@ -12,5 +12,37 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 6b589089edee3c84fa97c58c3ae1bbbd, type: 3}
|
||||
m_Name: InventoryTestDataSo
|
||||
m_EditorClassIdentifier:
|
||||
UseTestData: 0
|
||||
TestItems: []
|
||||
UseTestData: 1
|
||||
TestItems:
|
||||
- ItemId: item_food_recipe_001
|
||||
Quantity: 1
|
||||
- ItemId: item_food_recipe_002
|
||||
Quantity: 1
|
||||
- ItemId: item_food_recipe_003
|
||||
Quantity: 1
|
||||
- ItemId: item_food_recipe_004
|
||||
Quantity: 1
|
||||
- ItemId: item_food_recipe_005
|
||||
Quantity: 1
|
||||
- ItemId: item_drink_recipe_001
|
||||
Quantity: 1
|
||||
- ItemId: item_drink_recipe_002
|
||||
Quantity: 1
|
||||
- ItemId: item_drink_recipe_003
|
||||
Quantity: 1
|
||||
- ItemId: item_ingredient_001
|
||||
Quantity: 22
|
||||
- ItemId: item_ingredient_002
|
||||
Quantity: 5
|
||||
- ItemId: item_ingredient_003
|
||||
Quantity: 3
|
||||
- ItemId: item_ingredient_004
|
||||
Quantity: 7
|
||||
- ItemId: item_ingredient_005
|
||||
Quantity: 9
|
||||
- ItemId: item_ingredient_006
|
||||
Quantity: 12
|
||||
- ItemId: item_ingredient_021
|
||||
Quantity: 19
|
||||
- ItemId: item_ingredient_023
|
||||
Quantity: 7
|
||||
|
@ -18,5 +18,5 @@ MonoBehaviour:
|
||||
DrinkTasteOutlineColor: {r: 0.89019614, g: 0.44705886, b: 0, a: 1}
|
||||
MaxFoodCount: 8
|
||||
MaxDrinkCount: 6
|
||||
_foodRecipeIds: []
|
||||
_drinkRecipeIds: []
|
||||
EmptyBackgroundColor: {r: 0.5529412, g: 0.5254902, b: 0.44705886, a: 1}
|
||||
AddedBackgroundColor: {r: 0.92549026, g: 0.8431373, b: 0.53333336, a: 1}
|
||||
|
@ -19,6 +19,8 @@ public class RestaurantManagementSo : GameFlowTask
|
||||
[Title("오늘의 메뉴")]
|
||||
public int MaxFoodCount = 8;
|
||||
public int MaxDrinkCount = 6;
|
||||
public Color EmptyBackgroundColor = Color.magenta;
|
||||
public Color AddedBackgroundColor = Color.magenta;
|
||||
|
||||
private Dictionary<string, int> _foodRecipeIds = new();
|
||||
private Dictionary<string, int> _drinkRecipeIds = new();
|
||||
|
@ -1,7 +0,0 @@
|
||||
namespace DDD
|
||||
{
|
||||
public interface IItemSlotUiStrategy
|
||||
{
|
||||
void Setup(ItemSlotUi ui, ItemViewModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 52511a7b951114c4c9d417c7e2058642
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 407b93b401103f741a421b0d1daec4ce
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,14 +1,27 @@
|
||||
namespace DDD
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
public class InventorySlotUiStrategy : IItemSlotUiStrategy
|
||||
{
|
||||
public void Setup(ItemSlotUi ui, ItemViewModel model)
|
||||
public string AnimatorControllerKey => "InventorySlotUi";
|
||||
|
||||
public Task Setup(ItemSlotUi ui, ItemViewModel model)
|
||||
{
|
||||
ui.SetIcon(model.ItemSprite);
|
||||
ui.SetCount(model.Count);
|
||||
ui.ShowCount();
|
||||
ui.HideMark();
|
||||
ui.SetButtonInteractable(true);
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public async Task<RuntimeAnimatorController> GetAnimatorController()
|
||||
{
|
||||
return await AssetManager.LoadAsset<RuntimeAnimatorController>(AnimatorControllerKey);
|
||||
}
|
||||
|
||||
public void OnInventoryChanged(ItemSlotUi ui)
|
@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace DDD
|
||||
{
|
@ -3,6 +3,7 @@
|
||||
using System.Threading.Tasks;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.Localization.Components;
|
||||
using UnityEngine.UI;
|
||||
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8f537151c0e8fe4499c9691a33fbcaa4
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,12 @@
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
public interface IItemSlotUiStrategy
|
||||
{
|
||||
string AnimatorControllerKey { get; }
|
||||
Task Setup(ItemSlotUi ui, ItemViewModel model);
|
||||
Task<RuntimeAnimatorController> GetAnimatorController();
|
||||
}
|
||||
}
|
@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
@ -9,22 +11,28 @@ namespace DDD
|
||||
public class ItemSlotUi : MonoBehaviour, ISelectHandler
|
||||
{
|
||||
[SerializeField] private Button _button;
|
||||
[SerializeField] private Image _backgroundImage;
|
||||
[SerializeField] private Image _icon;
|
||||
[SerializeField] private TextMeshProUGUI _countText;
|
||||
[SerializeField] private Image _markImage;
|
||||
[SerializeField] private Animator _animator;
|
||||
|
||||
public ItemViewModel Model { get; private set; }
|
||||
public IItemSlotUiStrategy Strategy { get; private set; }
|
||||
|
||||
public void Initialize(ItemViewModel model, IItemSlotUiStrategy strategy)
|
||||
public async Task Initialize(ItemViewModel model, IItemSlotUiStrategy strategy)
|
||||
{
|
||||
Model = model;
|
||||
Strategy = strategy;
|
||||
Strategy.Setup(this, model);
|
||||
|
||||
await Strategy.Setup(this, model);
|
||||
var controller = await strategy.GetAnimatorController();
|
||||
_animator.runtimeAnimatorController = controller;
|
||||
//AssetManager.ReleaseCachedByKey(strategy.AnimatorControllerKey);
|
||||
}
|
||||
|
||||
public void SetBackgroundColor(Color color) => _backgroundImage.color = color;
|
||||
public void SetIcon(Sprite sprite) => _icon.sprite = sprite;
|
||||
|
||||
public void SetCount(int count)
|
||||
{
|
||||
_countText.text = count.ToString();
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c6b36b2c65aff7d4b95e3465c6faf3f3
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2ef13592d7febc24babc720b90a8bfa8
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace DDD
|
||||
{
|
@ -1,16 +1,28 @@
|
||||
namespace DDD
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace DDD
|
||||
{
|
||||
public class TodayMenuSlotUiStrategy : IItemSlotUiStrategy
|
||||
{
|
||||
private RestaurantManagementSo _restaurantManagementSo;
|
||||
private readonly RecipeType _recipeType;
|
||||
|
||||
public string AnimatorControllerKey => "TodayMenuSlotUi";
|
||||
|
||||
public TodayMenuSlotUiStrategy(RecipeType recipeType)
|
||||
{
|
||||
_recipeType = recipeType;
|
||||
}
|
||||
|
||||
public void Setup(ItemSlotUi ui, ItemViewModel model)
|
||||
public async Task Setup(ItemSlotUi ui, ItemViewModel model)
|
||||
{
|
||||
if (!_restaurantManagementSo)
|
||||
{
|
||||
_restaurantManagementSo = await AssetManager.LoadAsset<RestaurantManagementSo>(DataConstants.RestaurantManagementSo);
|
||||
}
|
||||
|
||||
if (model == null)
|
||||
{
|
||||
string emptySpriteKey = null;
|
||||
@ -22,6 +34,8 @@ public void Setup(ItemSlotUi ui, ItemViewModel model)
|
||||
{
|
||||
emptySpriteKey = SpriteConstants.EmptyDrinkSpriteKey;
|
||||
}
|
||||
|
||||
ui.SetBackgroundColor(_restaurantManagementSo.EmptyBackgroundColor);
|
||||
ui.SetIcon(DataManager.Instance.GetSprite(emptySpriteKey));
|
||||
ui.HideCount();
|
||||
ui.HideMark();
|
||||
@ -29,10 +43,16 @@ public void Setup(ItemSlotUi ui, ItemViewModel model)
|
||||
return;
|
||||
}
|
||||
|
||||
ui.SetBackgroundColor(_restaurantManagementSo.AddedBackgroundColor);
|
||||
ui.SetIcon(model.ItemSprite);
|
||||
ui.HideCount();
|
||||
ui.ShowMark(DataManager.Instance.GetSprite(SpriteConstants.CheckNoSpriteKey)); // TODO : 추후에 장비와 매칭
|
||||
ui.SetButtonInteractable(true);
|
||||
}
|
||||
|
||||
public async Task<RuntimeAnimatorController> GetAnimatorController()
|
||||
{
|
||||
return await AssetManager.LoadAsset<RuntimeAnimatorController>(AnimatorControllerKey);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace DDD
|
||||
{
|
Loading…
Reference in New Issue
Block a user