Idx 자료형 변경 int -> string
This commit is contained in:
parent
8bf142b2e5
commit
6591e1a66f
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,52 @@
|
|||||||
%YAML 1.1
|
%YAML 1.1
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &-7988510701821828726
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 3
|
||||||
|
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: 0b2db86121404754db890f4c8dfe81b2, type: 3}
|
||||||
|
m_Name: Bloom
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
active: 0
|
||||||
|
skipIterations:
|
||||||
|
m_OverrideState: 0
|
||||||
|
m_Value: 1
|
||||||
|
threshold:
|
||||||
|
m_OverrideState: 0
|
||||||
|
m_Value: 0.9
|
||||||
|
intensity:
|
||||||
|
m_OverrideState: 0
|
||||||
|
m_Value: 0
|
||||||
|
scatter:
|
||||||
|
m_OverrideState: 0
|
||||||
|
m_Value: 0.7
|
||||||
|
clamp:
|
||||||
|
m_OverrideState: 0
|
||||||
|
m_Value: 65472
|
||||||
|
tint:
|
||||||
|
m_OverrideState: 0
|
||||||
|
m_Value: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
highQualityFiltering:
|
||||||
|
m_OverrideState: 0
|
||||||
|
m_Value: 0
|
||||||
|
downscale:
|
||||||
|
m_OverrideState: 0
|
||||||
|
m_Value: 0
|
||||||
|
maxIterations:
|
||||||
|
m_OverrideState: 0
|
||||||
|
m_Value: 6
|
||||||
|
dirtTexture:
|
||||||
|
m_OverrideState: 0
|
||||||
|
m_Value: {fileID: 0}
|
||||||
|
dimension: 1
|
||||||
|
dirtIntensity:
|
||||||
|
m_OverrideState: 0
|
||||||
|
m_Value: 0
|
||||||
--- !u!114 &-3394915221019087120
|
--- !u!114 &-3394915221019087120
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 3
|
m_ObjectHideFlags: 3
|
||||||
@ -30,6 +77,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
components:
|
components:
|
||||||
- {fileID: 8563356217564074714}
|
- {fileID: 8563356217564074714}
|
||||||
|
- {fileID: -7988510701821828726}
|
||||||
--- !u!114 &1921075280319716275
|
--- !u!114 &1921075280319716275
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 3
|
m_ObjectHideFlags: 3
|
||||||
|
@ -26,7 +26,7 @@ namespace BlueWater.BehaviorTrees.Actions
|
|||||||
{
|
{
|
||||||
_foodBalloonUi = _customer.FoodBalloonUi;
|
_foodBalloonUi = _customer.FoodBalloonUi;
|
||||||
// TODO : 음료가 다양해질 때 수정해야함
|
// TODO : 음료가 다양해질 때 수정해야함
|
||||||
_foodBalloonUi.OrderFood(40001, _customerData.WaitTime, _customerData.HurryTime);
|
_foodBalloonUi.OrderFood("40001", _customerData.WaitTime, _customerData.HurryTime);
|
||||||
|
|
||||||
_customer.OnInteraction += HandleBeverageInteraction;
|
_customer.OnInteraction += HandleBeverageInteraction;
|
||||||
_customer.RegisterPlayerInteraction();
|
_customer.RegisterPlayerInteraction();
|
||||||
@ -76,7 +76,7 @@ namespace BlueWater.BehaviorTrees.Actions
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO : 음료가 다양해질 때 수정해야함
|
// TODO : 음료가 다양해질 때 수정해야함
|
||||||
if (carriedBeverageData.Idx == 40001)
|
if (carriedBeverageData.Idx == "40001")
|
||||||
{
|
{
|
||||||
tycoonPlayer.GiveItem();
|
tycoonPlayer.GiveItem();
|
||||||
_foodBalloonUi.ReceiveFood();
|
_foodBalloonUi.ReceiveFood();
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using BehaviorDesigner.Runtime.Tasks;
|
using BehaviorDesigner.Runtime.Tasks;
|
||||||
using BlueWater.Items;
|
using BlueWater.Items;
|
||||||
using BlueWater.Npcs.Customers;
|
using BlueWater.Npcs.Customers;
|
||||||
@ -17,7 +16,7 @@ namespace BlueWater.BehaviorTrees.Actions
|
|||||||
private Customer _customer;
|
private Customer _customer;
|
||||||
private CustomerData _customerData;
|
private CustomerData _customerData;
|
||||||
private FoodBalloonUi _foodBalloonUi;
|
private FoodBalloonUi _foodBalloonUi;
|
||||||
private int _orderFoodIdx;
|
private string _orderFoodIdx;
|
||||||
|
|
||||||
public override void OnAwake()
|
public override void OnAwake()
|
||||||
{
|
{
|
||||||
|
@ -7,12 +7,12 @@ namespace BlueWater
|
|||||||
public class CharacterData
|
public class CharacterData
|
||||||
{
|
{
|
||||||
[field: SerializeField]
|
[field: SerializeField]
|
||||||
public int CharacterIdx { get; set; }
|
public string CharacterIdx { get; set; }
|
||||||
|
|
||||||
[field: SerializeField]
|
[field: SerializeField]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
public CharacterData(int characterIdx, string name)
|
public CharacterData(string characterIdx, string name)
|
||||||
{
|
{
|
||||||
CharacterIdx = characterIdx;
|
CharacterIdx = characterIdx;
|
||||||
Name = name;
|
Name = name;
|
||||||
|
@ -15,7 +15,7 @@ namespace BlueWater.Enemies.Bosses
|
|||||||
public string DisplayName { get; private set; }
|
public string DisplayName { get; private set; }
|
||||||
|
|
||||||
[field: SerializeField]
|
[field: SerializeField]
|
||||||
public int CharacterIdx { get; private set; }
|
public string CharacterIdx { get; private set; }
|
||||||
|
|
||||||
[field: SerializeField]
|
[field: SerializeField]
|
||||||
public int MaxHealthPoint { get; private set; }
|
public int MaxHealthPoint { get; private set; }
|
||||||
|
@ -31,7 +31,7 @@ namespace BlueWater
|
|||||||
|
|
||||||
public event Action<ItemSlot, bool> OnChangeItemSlot;
|
public event Action<ItemSlot, bool> OnChangeItemSlot;
|
||||||
|
|
||||||
public ItemSlot GetItemByIdx(int idx)
|
public ItemSlot GetItemByIdx(string idx)
|
||||||
{
|
{
|
||||||
return ItemSlotList.Find(i => i.Idx == idx);
|
return ItemSlotList.Find(i => i.Idx == idx);
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,7 @@ namespace BlueWater.Npcs.Customers
|
|||||||
BarkTrigger = transform.Find("DialogueSystem").GetComponent<BarkTrigger>();
|
BarkTrigger = transform.Find("DialogueSystem").GetComponent<BarkTrigger>();
|
||||||
PayMoneyParticle = transform.Find("PayMoneyParticle").GetComponent<ParticleSystem>();
|
PayMoneyParticle = transform.Find("PayMoneyParticle").GetComponent<ParticleSystem>();
|
||||||
InteractionCanvas = transform.Find("InteractionCanvas").GetComponent<Canvas>();
|
InteractionCanvas = transform.Find("InteractionCanvas").GetComponent<Canvas>();
|
||||||
InteractionCanvas.worldCamera = TycoonCameraManager.Instance.UiCamera;
|
//InteractionCanvas.worldCamera = TycoonCameraManager.Instance.UiCamera;
|
||||||
InteractionUi = InteractionCanvas.transform.Find("InteractionUi");
|
InteractionUi = InteractionCanvas.transform.Find("InteractionUi");
|
||||||
InteractionUi.localScale = Vector3.one * (1 / transform.localScale.x);
|
InteractionUi.localScale = Vector3.one * (1 / transform.localScale.x);
|
||||||
FoodBalloonUi = InteractionCanvas.transform.Find("FoodBalloonUi").GetComponent<FoodBalloonUi>();
|
FoodBalloonUi = InteractionCanvas.transform.Find("FoodBalloonUi").GetComponent<FoodBalloonUi>();
|
||||||
|
@ -12,7 +12,7 @@ namespace BlueWater.Npcs.Customers
|
|||||||
{
|
{
|
||||||
[BoxGroup("Json 데이터 영역")]
|
[BoxGroup("Json 데이터 영역")]
|
||||||
[field: SerializeField, Tooltip("고유 식별 ID"), BoxGroup("Json 데이터 영역")]
|
[field: SerializeField, Tooltip("고유 식별 ID"), BoxGroup("Json 데이터 영역")]
|
||||||
public int Idx { get; set; }
|
public string Idx { get; set; }
|
||||||
|
|
||||||
[field: SerializeField, Tooltip("이름"), BoxGroup("Json 데이터 영역")]
|
[field: SerializeField, Tooltip("이름"), BoxGroup("Json 데이터 영역")]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
@ -31,7 +31,7 @@ namespace BlueWater.Players.Tycoons
|
|||||||
_itemRenderer = transform.Find("VisualLook/Item").GetComponent<SpriteRenderer>();
|
_itemRenderer = transform.Find("VisualLook/Item").GetComponent<SpriteRenderer>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CarryItem(int itemIdx, bool isUsingSprite = true, ItemQuality itemQuality = ItemQuality.Normal)
|
public void CarryItem(string itemIdx, bool isUsingSprite = true, ItemQuality itemQuality = ItemQuality.Normal)
|
||||||
{
|
{
|
||||||
if (_isCarriedItem)
|
if (_isCarriedItem)
|
||||||
{
|
{
|
||||||
|
@ -125,7 +125,7 @@ namespace BlueWater.Players.Tycoons
|
|||||||
public void GetMoney(int money) => DataManager.Instance.GetMoney(money);
|
public void GetMoney(int money) => DataManager.Instance.GetMoney(money);
|
||||||
public bool IsCarriedItem() => TycoonCarryHandler.IsCarriedItem();
|
public bool IsCarriedItem() => TycoonCarryHandler.IsCarriedItem();
|
||||||
|
|
||||||
public void CarryItem(int itemIdx, bool isUsingSprite = true, ItemQuality itemQuality = ItemQuality.Normal)
|
public void CarryItem(string itemIdx, bool isUsingSprite = true, ItemQuality itemQuality = ItemQuality.Normal)
|
||||||
{
|
{
|
||||||
TycoonCarryHandler.CarryItem(itemIdx, isUsingSprite, itemQuality);
|
TycoonCarryHandler.CarryItem(itemIdx, isUsingSprite, itemQuality);
|
||||||
if (!isUsingSprite)
|
if (!isUsingSprite)
|
||||||
|
@ -30,7 +30,7 @@ namespace BlueWater
|
|||||||
|
|
||||||
[field: Title("아이템 데이터")]
|
[field: Title("아이템 데이터")]
|
||||||
[field: SerializeField]
|
[field: SerializeField]
|
||||||
public List<int> FoodRecipes { get; private set; } = new();
|
public List<string> FoodRecipes { get; private set; } = new();
|
||||||
|
|
||||||
[field: Title("타이쿤 데이터")]
|
[field: Title("타이쿤 데이터")]
|
||||||
[field: SerializeField]
|
[field: SerializeField]
|
||||||
@ -49,29 +49,29 @@ namespace BlueWater
|
|||||||
|
|
||||||
public void TestData()
|
public void TestData()
|
||||||
{
|
{
|
||||||
Inventory.AddItem(new ItemSlot(10107, 2));
|
Inventory.AddItem(new ItemSlot("10107", 2));
|
||||||
Inventory.AddItem(new ItemSlot(10108, 1));
|
Inventory.AddItem(new ItemSlot("10108", 1));
|
||||||
Inventory.AddItem(new ItemSlot(10109, 2));
|
Inventory.AddItem(new ItemSlot("10109", 2));
|
||||||
Inventory.AddItem(new ItemSlot(10201, 1));
|
Inventory.AddItem(new ItemSlot("10201", 1));
|
||||||
Inventory.AddItem(new ItemSlot(10404, 9));
|
Inventory.AddItem(new ItemSlot("10404", 9));
|
||||||
Inventory.AddItem(new ItemSlot(10503, 4));
|
Inventory.AddItem(new ItemSlot("10503", 4));
|
||||||
Inventory.AddItem(new ItemSlot(10507, 15));
|
Inventory.AddItem(new ItemSlot("10507", 15));
|
||||||
Inventory.AddItem(new ItemSlot(10508, 100));
|
Inventory.AddItem(new ItemSlot("10508", 100));
|
||||||
Inventory.AddItem(new ItemSlot(10603, 3));
|
Inventory.AddItem(new ItemSlot("10603", 3));
|
||||||
Inventory.AddItem(new ItemSlot(10701, 999));
|
Inventory.AddItem(new ItemSlot("10701", 999));
|
||||||
Inventory.AddItem(new ItemSlot(10704, 5396));
|
Inventory.AddItem(new ItemSlot("10704", 5396));
|
||||||
Inventory.AddItem(new ItemSlot(10705, 66));
|
Inventory.AddItem(new ItemSlot("10705", 66));
|
||||||
Inventory.AddItem(new ItemSlot(10706, 35));
|
Inventory.AddItem(new ItemSlot("10706", 35));
|
||||||
Inventory.AddItem(new ItemSlot(60001, 2));
|
Inventory.AddItem(new ItemSlot("60001", 2));
|
||||||
|
|
||||||
AddFoodRecipe(30001);
|
AddFoodRecipe("30001");
|
||||||
AddFoodRecipe(30002);
|
AddFoodRecipe("30002");
|
||||||
AddFoodRecipe(30004);
|
AddFoodRecipe("30004");
|
||||||
AddFoodRecipe(30005);
|
AddFoodRecipe("30005");
|
||||||
AddFoodRecipe(30006);
|
AddFoodRecipe("30006");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddFoodRecipe(int idx)
|
public void AddFoodRecipe(string idx)
|
||||||
{
|
{
|
||||||
if (FoodRecipes.Contains(idx)) return;
|
if (FoodRecipes.Contains(idx)) return;
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ namespace BlueWater.Editors
|
|||||||
{
|
{
|
||||||
existingData ??= new List<T>();
|
existingData ??= new List<T>();
|
||||||
|
|
||||||
var newDataIdxSet = new HashSet<int>();
|
var newDataIdxSet = new HashSet<string>();
|
||||||
foreach (var newDataItem in newData)
|
foreach (var newDataItem in newData)
|
||||||
{
|
{
|
||||||
if (newDataItem != null)
|
if (newDataItem != null)
|
||||||
@ -161,7 +161,7 @@ namespace BlueWater.Editors
|
|||||||
|
|
||||||
existingData.RemoveAll(item => item == null || !newDataIdxSet.Contains(item.Idx));
|
existingData.RemoveAll(item => item == null || !newDataIdxSet.Contains(item.Idx));
|
||||||
|
|
||||||
var existingDataDict = new Dictionary<int, T>();
|
var existingDataDict = new Dictionary<string, T>();
|
||||||
foreach (var data in existingData)
|
foreach (var data in existingData)
|
||||||
{
|
{
|
||||||
if (data != null)
|
if (data != null)
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
{
|
{
|
||||||
public interface IIdx
|
public interface IIdx
|
||||||
{
|
{
|
||||||
int Idx { get; }
|
string Idx { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
8
Assets/02.Scripts/Item/Cocktail.meta
Normal file
8
Assets/02.Scripts/Item/Cocktail.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 47b7c7086a4367c42888ee19cb8e46ab
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
65
Assets/02.Scripts/Item/Cocktail/CocktailData.cs
Normal file
65
Assets/02.Scripts/Item/Cocktail/CocktailData.cs
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using BlueWater.Interfaces;
|
||||||
|
using Sirenix.OdinInspector;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace BlueWater.Items
|
||||||
|
{
|
||||||
|
[Serializable]
|
||||||
|
public class CocktailData : IIdx
|
||||||
|
{
|
||||||
|
[BoxGroup("Json 데이터 영역")]
|
||||||
|
[field: SerializeField, Tooltip("고유 식별 ID"), BoxGroup("Json 데이터 영역")]
|
||||||
|
public string Idx { get; set; }
|
||||||
|
|
||||||
|
[field: SerializeField, Tooltip("이름"), BoxGroup("Json 데이터 영역")]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
[field: SerializeField, Tooltip("오차 범위"), BoxGroup("Json 데이터 영역")]
|
||||||
|
public int RatioRange { get; set; }
|
||||||
|
|
||||||
|
[field: SerializeField, Tooltip("1번 재료 식별 Idx"), BoxGroup("Json 데이터 영역")]
|
||||||
|
public string IngredientIdx1 { get; set; }
|
||||||
|
|
||||||
|
[field: SerializeField, Tooltip("1번 재료 수량 Idx"), BoxGroup("Json 데이터 영역")]
|
||||||
|
public int IngredientRatio1 { get; set; }
|
||||||
|
|
||||||
|
[field: SerializeField, Tooltip("2번 재료 식별 Idx"), BoxGroup("Json 데이터 영역")]
|
||||||
|
public string IngredientIdx2 { get; set; }
|
||||||
|
|
||||||
|
[field: SerializeField, Tooltip("2번 재료 수량 Idx"), BoxGroup("Json 데이터 영역")]
|
||||||
|
public int IngredientRatio2 { get; set; }
|
||||||
|
|
||||||
|
[field: SerializeField, Tooltip("3번 재료 식별 Idx"), BoxGroup("Json 데이터 영역")]
|
||||||
|
public string IngredientIdx3 { get; set; }
|
||||||
|
|
||||||
|
[field: SerializeField, Tooltip("3번 재료 수량 Idx"), BoxGroup("Json 데이터 영역")]
|
||||||
|
public int IngredientRatio3 { get; set; }
|
||||||
|
|
||||||
|
[field: SerializeField, Tooltip("4번 재료 식별 Idx"), BoxGroup("Json 데이터 영역")]
|
||||||
|
public string IngredientIdx4 { get; set; }
|
||||||
|
|
||||||
|
[field: SerializeField, Tooltip("4번 재료 수량 Idx"), BoxGroup("Json 데이터 영역")]
|
||||||
|
public int IngredientRatio4 { get; set; }
|
||||||
|
|
||||||
|
[field: SerializeField, Tooltip("5번 재료 식별 Idx"), BoxGroup("Json 데이터 영역")]
|
||||||
|
public string IngredientIdx5 { get; set; }
|
||||||
|
|
||||||
|
[field: SerializeField, Tooltip("5번 재료 수량 Idx"), BoxGroup("Json 데이터 영역")]
|
||||||
|
public int IngredientRatio5 { get; set; }
|
||||||
|
|
||||||
|
public List<CocktailIngredient> GetValidIngredients()
|
||||||
|
{
|
||||||
|
var ingredients = new List<CocktailIngredient>(5);
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(IngredientIdx1)) ingredients.Add(new CocktailIngredient(IngredientIdx1, IngredientRatio1));
|
||||||
|
if (!string.IsNullOrEmpty(IngredientIdx2)) ingredients.Add(new CocktailIngredient(IngredientIdx2, IngredientRatio2));
|
||||||
|
if (!string.IsNullOrEmpty(IngredientIdx3)) ingredients.Add(new CocktailIngredient(IngredientIdx3, IngredientRatio3));
|
||||||
|
if (!string.IsNullOrEmpty(IngredientIdx4)) ingredients.Add(new CocktailIngredient(IngredientIdx4, IngredientRatio4));
|
||||||
|
if (!string.IsNullOrEmpty(IngredientIdx5)) ingredients.Add(new CocktailIngredient(IngredientIdx5, IngredientRatio5));
|
||||||
|
|
||||||
|
return ingredients;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
2
Assets/02.Scripts/Item/Cocktail/CocktailData.cs.meta
Normal file
2
Assets/02.Scripts/Item/Cocktail/CocktailData.cs.meta
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c7f4e50ba016a084a9215cbc874707b5
|
17
Assets/02.Scripts/Item/Cocktail/CocktailIngredient.cs
Normal file
17
Assets/02.Scripts/Item/Cocktail/CocktailIngredient.cs
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace BlueWater.Items
|
||||||
|
{
|
||||||
|
[Serializable]
|
||||||
|
public class CocktailIngredient
|
||||||
|
{
|
||||||
|
public string Idx { get; set; }
|
||||||
|
public int Ratio { get; set; }
|
||||||
|
|
||||||
|
public CocktailIngredient(string idx, int quantity)
|
||||||
|
{
|
||||||
|
Idx = idx;
|
||||||
|
Ratio = quantity;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: db9868cd60ce5c749a33906472f0eb4d
|
@ -7,7 +7,7 @@ namespace BlueWater.Items
|
|||||||
public class DropItem
|
public class DropItem
|
||||||
{
|
{
|
||||||
[field: SerializeField]
|
[field: SerializeField]
|
||||||
public int ItemIdx { get; set; }
|
public string ItemIdx { get; set; }
|
||||||
|
|
||||||
[field: SerializeField]
|
[field: SerializeField]
|
||||||
public int DropRate { get; set; }
|
public int DropRate { get; set; }
|
||||||
|
@ -29,7 +29,7 @@ namespace BlueWater.Items
|
|||||||
{
|
{
|
||||||
[BoxGroup("Json 데이터 영역")]
|
[BoxGroup("Json 데이터 영역")]
|
||||||
[field: SerializeField, Tooltip("고유 식별 ID"), BoxGroup("Json 데이터 영역")]
|
[field: SerializeField, Tooltip("고유 식별 ID"), BoxGroup("Json 데이터 영역")]
|
||||||
public int Idx { get; set; }
|
public string Idx { get; set; }
|
||||||
|
|
||||||
[field: SerializeField, Tooltip("이름"), BoxGroup("Json 데이터 영역")]
|
[field: SerializeField, Tooltip("이름"), BoxGroup("Json 데이터 영역")]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
@ -47,31 +47,31 @@ namespace BlueWater.Items
|
|||||||
public int Plate { get; set; }
|
public int Plate { get; set; }
|
||||||
|
|
||||||
[field: SerializeField, Tooltip("1번 재료 식별 Idx"), BoxGroup("Json 데이터 영역")]
|
[field: SerializeField, Tooltip("1번 재료 식별 Idx"), BoxGroup("Json 데이터 영역")]
|
||||||
public int IngredientIdx1 { get; set; }
|
public string IngredientIdx1 { get; set; }
|
||||||
|
|
||||||
[field: SerializeField, Tooltip("1번 재료 수량 Idx"), BoxGroup("Json 데이터 영역")]
|
[field: SerializeField, Tooltip("1번 재료 수량 Idx"), BoxGroup("Json 데이터 영역")]
|
||||||
public int IngredientQuantity1 { get; set; }
|
public int IngredientQuantity1 { get; set; }
|
||||||
|
|
||||||
[field: SerializeField, Tooltip("2번 재료 식별 Idx"), BoxGroup("Json 데이터 영역")]
|
[field: SerializeField, Tooltip("2번 재료 식별 Idx"), BoxGroup("Json 데이터 영역")]
|
||||||
public int IngredientIdx2 { get; set; }
|
public string IngredientIdx2 { get; set; }
|
||||||
|
|
||||||
[field: SerializeField, Tooltip("2번 재료 수량 Idx"), BoxGroup("Json 데이터 영역")]
|
[field: SerializeField, Tooltip("2번 재료 수량 Idx"), BoxGroup("Json 데이터 영역")]
|
||||||
public int IngredientQuantity2 { get; set; }
|
public int IngredientQuantity2 { get; set; }
|
||||||
|
|
||||||
[field: SerializeField, Tooltip("3번 재료 식별 Idx"), BoxGroup("Json 데이터 영역")]
|
[field: SerializeField, Tooltip("3번 재료 식별 Idx"), BoxGroup("Json 데이터 영역")]
|
||||||
public int IngredientIdx3 { get; set; }
|
public string IngredientIdx3 { get; set; }
|
||||||
|
|
||||||
[field: SerializeField, Tooltip("3번 재료 수량 Idx"), BoxGroup("Json 데이터 영역")]
|
[field: SerializeField, Tooltip("3번 재료 수량 Idx"), BoxGroup("Json 데이터 영역")]
|
||||||
public int IngredientQuantity3 { get; set; }
|
public int IngredientQuantity3 { get; set; }
|
||||||
|
|
||||||
[field: SerializeField, Tooltip("4번 재료 식별 Idx"), BoxGroup("Json 데이터 영역")]
|
[field: SerializeField, Tooltip("4번 재료 식별 Idx"), BoxGroup("Json 데이터 영역")]
|
||||||
public int IngredientIdx4 { get; set; }
|
public string IngredientIdx4 { get; set; }
|
||||||
|
|
||||||
[field: SerializeField, Tooltip("4번 재료 수량 Idx"), BoxGroup("Json 데이터 영역")]
|
[field: SerializeField, Tooltip("4번 재료 수량 Idx"), BoxGroup("Json 데이터 영역")]
|
||||||
public int IngredientQuantity4 { get; set; }
|
public int IngredientQuantity4 { get; set; }
|
||||||
|
|
||||||
[field: SerializeField, Tooltip("5번 재료 식별 Idx"), BoxGroup("Json 데이터 영역")]
|
[field: SerializeField, Tooltip("5번 재료 식별 Idx"), BoxGroup("Json 데이터 영역")]
|
||||||
public int IngredientIdx5 { get; set; }
|
public string IngredientIdx5 { get; set; }
|
||||||
|
|
||||||
[field: SerializeField, Tooltip("5번 재료 수량 Idx"), BoxGroup("Json 데이터 영역")]
|
[field: SerializeField, Tooltip("5번 재료 수량 Idx"), BoxGroup("Json 데이터 영역")]
|
||||||
public int IngredientQuantity5 { get; set; }
|
public int IngredientQuantity5 { get; set; }
|
||||||
@ -80,11 +80,11 @@ namespace BlueWater.Items
|
|||||||
{
|
{
|
||||||
var ingredients = new List<Ingredient>(5);
|
var ingredients = new List<Ingredient>(5);
|
||||||
|
|
||||||
if (IngredientIdx1 != 0) ingredients.Add(new Ingredient(IngredientIdx1, IngredientQuantity1));
|
if (!string.IsNullOrEmpty(IngredientIdx1)) ingredients.Add(new Ingredient(IngredientIdx1, IngredientQuantity1));
|
||||||
if (IngredientIdx2 != 0) ingredients.Add(new Ingredient(IngredientIdx2, IngredientQuantity2));
|
if (!string.IsNullOrEmpty(IngredientIdx2)) ingredients.Add(new Ingredient(IngredientIdx2, IngredientQuantity2));
|
||||||
if (IngredientIdx3 != 0) ingredients.Add(new Ingredient(IngredientIdx3, IngredientQuantity3));
|
if (!string.IsNullOrEmpty(IngredientIdx3)) ingredients.Add(new Ingredient(IngredientIdx3, IngredientQuantity3));
|
||||||
if (IngredientIdx4 != 0) ingredients.Add(new Ingredient(IngredientIdx4, IngredientQuantity4));
|
if (!string.IsNullOrEmpty(IngredientIdx4)) ingredients.Add(new Ingredient(IngredientIdx4, IngredientQuantity4));
|
||||||
if (IngredientIdx5 != 0) ingredients.Add(new Ingredient(IngredientIdx5, IngredientQuantity5));
|
if (!string.IsNullOrEmpty(IngredientIdx5)) ingredients.Add(new Ingredient(IngredientIdx5, IngredientQuantity5));
|
||||||
|
|
||||||
return ingredients;
|
return ingredients;
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,10 @@ namespace BlueWater.Items
|
|||||||
[Serializable]
|
[Serializable]
|
||||||
public class Ingredient
|
public class Ingredient
|
||||||
{
|
{
|
||||||
public int Idx { get; set; }
|
public string Idx { get; set; }
|
||||||
public int Quantity { get; set; }
|
public int Quantity { get; set; }
|
||||||
|
|
||||||
public Ingredient(int idx, int quantity)
|
public Ingredient(string idx, int quantity)
|
||||||
{
|
{
|
||||||
Idx = idx;
|
Idx = idx;
|
||||||
Quantity = quantity;
|
Quantity = quantity;
|
||||||
|
@ -39,7 +39,7 @@ namespace BlueWater.Items
|
|||||||
{
|
{
|
||||||
[BoxGroup("Json 데이터 영역")]
|
[BoxGroup("Json 데이터 영역")]
|
||||||
[field: SerializeField, Tooltip("고유 식별 ID"), BoxGroup("Json 데이터 영역")]
|
[field: SerializeField, Tooltip("고유 식별 ID"), BoxGroup("Json 데이터 영역")]
|
||||||
public int Idx { get; set; }
|
public string Idx { get; set; }
|
||||||
|
|
||||||
[field: SerializeField, Tooltip("이름"), BoxGroup("Json 데이터 영역")]
|
[field: SerializeField, Tooltip("이름"), BoxGroup("Json 데이터 영역")]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
@ -70,7 +70,7 @@ namespace BlueWater.Items
|
|||||||
public Item ItemPrefab { get; set; }
|
public Item ItemPrefab { get; set; }
|
||||||
|
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public ItemData(int idx, string name, ItemType type, IngredientType ingredientType, ItemQuality quality, int price,
|
public ItemData(string idx, string name, ItemType type, IngredientType ingredientType, ItemQuality quality, int price,
|
||||||
int weight, string description, Sprite sprite, Item itemPrefab)
|
int weight, string description, Sprite sprite, Item itemPrefab)
|
||||||
{
|
{
|
||||||
Idx = idx;
|
Idx = idx;
|
||||||
|
@ -43,16 +43,16 @@ namespace BlueWater.Items
|
|||||||
private static List<ItemDropTable> ParseJsonToCharacterDrops(string itemDropJsonString, string characterDataJsonString)
|
private static List<ItemDropTable> ParseJsonToCharacterDrops(string itemDropJsonString, string characterDataJsonString)
|
||||||
{
|
{
|
||||||
var newItemDropTables = new List<ItemDropTable>();
|
var newItemDropTables = new List<ItemDropTable>();
|
||||||
var itemDropTables = new Dictionary<int, ItemDropTable>();
|
var itemDropTables = new Dictionary<string, ItemDropTable>();
|
||||||
var characterDataDictionary = ParseCharacterDataJson(characterDataJsonString);
|
var characterDataDictionary = ParseCharacterDataJson(characterDataJsonString);
|
||||||
|
|
||||||
var jsonArray = JArray.Parse(itemDropJsonString);
|
var jsonArray = JArray.Parse(itemDropJsonString);
|
||||||
foreach (var element in jsonArray)
|
foreach (var element in jsonArray)
|
||||||
{
|
{
|
||||||
var characterIdx = (int)element["CharacterIdx"];
|
var characterIdx = (string)element["CharacterIdx"];
|
||||||
var dropItem = new DropItem
|
var dropItem = new DropItem
|
||||||
{
|
{
|
||||||
ItemIdx = (int)element["ItemIdx"],
|
ItemIdx = (string)element["ItemIdx"],
|
||||||
DropRate = (int)element["DropRate"],
|
DropRate = (int)element["DropRate"],
|
||||||
QuantityMin = (int)element["QuantityMin"],
|
QuantityMin = (int)element["QuantityMin"],
|
||||||
QuantityMax = (int)element["QuantityMax"]
|
QuantityMax = (int)element["QuantityMax"]
|
||||||
@ -71,14 +71,14 @@ namespace BlueWater.Items
|
|||||||
return newItemDropTables;
|
return newItemDropTables;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Dictionary<int, string> ParseCharacterDataJson(string characterDataJsonString)
|
private static Dictionary<string, string> ParseCharacterDataJson(string characterDataJsonString)
|
||||||
{
|
{
|
||||||
var characterDataDictionary = new Dictionary<int, string>();
|
var characterDataDictionary = new Dictionary<string, string>();
|
||||||
var jsonArray = JArray.Parse(characterDataJsonString);
|
var jsonArray = JArray.Parse(characterDataJsonString);
|
||||||
|
|
||||||
foreach (var element in jsonArray)
|
foreach (var element in jsonArray)
|
||||||
{
|
{
|
||||||
var characterIdx = (int)element["CharacterIdx"];
|
var characterIdx = (string)element["CharacterIdx"];
|
||||||
var name = (string)element["Name"];
|
var name = (string)element["Name"];
|
||||||
characterDataDictionary[characterIdx] = name;
|
characterDataDictionary[characterIdx] = name;
|
||||||
}
|
}
|
||||||
|
@ -12,15 +12,15 @@ namespace BlueWater.Items
|
|||||||
|
|
||||||
[SerializeField, Required]
|
[SerializeField, Required]
|
||||||
private ItemDataSo _itemDataSo;
|
private ItemDataSo _itemDataSo;
|
||||||
private Dictionary<int, ItemData> _itemDataDictionary;
|
private Dictionary<string, ItemData> _itemDataDictionary;
|
||||||
|
|
||||||
[SerializeField, Required]
|
[SerializeField, Required]
|
||||||
private ItemDropTableSo _itemDropTableSo;
|
private ItemDropTableSo _itemDropTableSo;
|
||||||
private Dictionary<int, ItemDropTable> _itemDropTableDictionary;
|
private Dictionary<string, ItemDropTable> _itemDropTableDictionary;
|
||||||
|
|
||||||
[SerializeField, Required]
|
[SerializeField, Required]
|
||||||
private FoodDataSo _foodDataSo;
|
private FoodDataSo _foodDataSo;
|
||||||
private Dictionary<int, FoodData> _foodDataDictionary;
|
private Dictionary<string, FoodData> _foodDataDictionary;
|
||||||
|
|
||||||
[field: SerializeField, Required]
|
[field: SerializeField, Required]
|
||||||
public ItemSlotDataSo ItemSlotDataSo { get; private set; }
|
public ItemSlotDataSo ItemSlotDataSo { get; private set; }
|
||||||
@ -43,26 +43,26 @@ namespace BlueWater.Items
|
|||||||
|
|
||||||
private void Initialize()
|
private void Initialize()
|
||||||
{
|
{
|
||||||
_itemDataDictionary = new Dictionary<int, ItemData>(_itemDataSo.ItemDataList.Count);
|
_itemDataDictionary = new Dictionary<string, ItemData>(_itemDataSo.ItemDataList.Count);
|
||||||
foreach (var element in _itemDataSo.ItemDataList)
|
foreach (var element in _itemDataSo.ItemDataList)
|
||||||
{
|
{
|
||||||
_itemDataDictionary.TryAdd(element.Idx, element);
|
_itemDataDictionary.TryAdd(element.Idx, element);
|
||||||
}
|
}
|
||||||
|
|
||||||
_itemDropTableDictionary = new Dictionary<int, ItemDropTable>(_itemDropTableSo.ItemDropTables.Count);
|
_itemDropTableDictionary = new Dictionary<string, ItemDropTable>(_itemDropTableSo.ItemDropTables.Count);
|
||||||
foreach (var element in _itemDropTableSo.ItemDropTables)
|
foreach (var element in _itemDropTableSo.ItemDropTables)
|
||||||
{
|
{
|
||||||
_itemDropTableDictionary.TryAdd(element.CharacterData.CharacterIdx, element);
|
_itemDropTableDictionary.TryAdd(element.CharacterData.CharacterIdx, element);
|
||||||
}
|
}
|
||||||
|
|
||||||
_foodDataDictionary = new Dictionary<int, FoodData>(_foodDataSo.FoodDatas.Count);
|
_foodDataDictionary = new Dictionary<string, FoodData>(_foodDataSo.FoodDatas.Count);
|
||||||
foreach (var element in _foodDataSo.FoodDatas)
|
foreach (var element in _foodDataSo.FoodDatas)
|
||||||
{
|
{
|
||||||
_foodDataDictionary.TryAdd(element.Idx, element);
|
_foodDataDictionary.TryAdd(element.Idx, element);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ItemDropRandomPosition(int idx, Vector3 dropPosition, float randomDropRadius = float.PositiveInfinity)
|
public void ItemDropRandomPosition(string idx, Vector3 dropPosition, float randomDropRadius = float.PositiveInfinity)
|
||||||
{
|
{
|
||||||
var itemDropTable = GetItemDropTableByIdx(idx);
|
var itemDropTable = GetItemDropTableByIdx(idx);
|
||||||
if (itemDropTable == null) return;
|
if (itemDropTable == null) return;
|
||||||
@ -103,7 +103,7 @@ namespace BlueWater.Items
|
|||||||
return positions.Any(pos => Vector3.Distance(position, pos) > _minSeparationDistance);
|
return positions.Any(pos => Vector3.Distance(position, pos) > _minSeparationDistance);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemData GetItemDataByIdx(int idx)
|
public ItemData GetItemDataByIdx(string idx)
|
||||||
{
|
{
|
||||||
if (_itemDataDictionary.TryGetValue(idx, out var itemData)) return itemData;
|
if (_itemDataDictionary.TryGetValue(idx, out var itemData)) return itemData;
|
||||||
|
|
||||||
@ -111,9 +111,9 @@ namespace BlueWater.Items
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemDropTable GetItemDropTableByIdx(int idx)
|
public ItemDropTable GetItemDropTableByIdx(string idx)
|
||||||
{
|
{
|
||||||
if (idx == 0)
|
if (string.IsNullOrEmpty(idx))
|
||||||
{
|
{
|
||||||
Debug.Log("ItemDropTable이 비어있습니다.");
|
Debug.Log("ItemDropTable이 비어있습니다.");
|
||||||
return null;
|
return null;
|
||||||
@ -125,7 +125,7 @@ namespace BlueWater.Items
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public FoodData GetFoodDataByIdx(int idx)
|
public FoodData GetFoodDataByIdx(string idx)
|
||||||
{
|
{
|
||||||
if (_foodDataDictionary.TryGetValue(idx, out var foodData)) return foodData;
|
if (_foodDataDictionary.TryGetValue(idx, out var foodData)) return foodData;
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ namespace BlueWater.Items
|
|||||||
public class ItemSlot
|
public class ItemSlot
|
||||||
{
|
{
|
||||||
[field: SerializeField, Tooltip("아이템 인덱스")]
|
[field: SerializeField, Tooltip("아이템 인덱스")]
|
||||||
public int Idx { get; private set; }
|
public string Idx { get; private set; }
|
||||||
|
|
||||||
[field: SerializeField, Tooltip("아이템 수량")]
|
[field: SerializeField, Tooltip("아이템 수량")]
|
||||||
public int Quantity { get; set; }
|
public int Quantity { get; set; }
|
||||||
@ -15,7 +15,7 @@ namespace BlueWater.Items
|
|||||||
[field: SerializeField, Tooltip("아이템 획득 시간")]
|
[field: SerializeField, Tooltip("아이템 획득 시간")]
|
||||||
public long AcquisitionTime { get; set; }
|
public long AcquisitionTime { get; set; }
|
||||||
|
|
||||||
public ItemSlot(int idx, int quantity)
|
public ItemSlot(string idx, int quantity)
|
||||||
{
|
{
|
||||||
Idx = idx;
|
Idx = idx;
|
||||||
Quantity = quantity;
|
Quantity = quantity;
|
||||||
|
@ -8,6 +8,9 @@ namespace BlueWater
|
|||||||
[SerializeField]
|
[SerializeField]
|
||||||
private SpriteRenderer _spriteRenderer;
|
private SpriteRenderer _spriteRenderer;
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
private Rigidbody2D _rigidbody2D;
|
||||||
|
|
||||||
[SerializeField, Range(0f, 2f)]
|
[SerializeField, Range(0f, 2f)]
|
||||||
private float _distanceThreshold = 0.5f;
|
private float _distanceThreshold = 0.5f;
|
||||||
|
|
||||||
@ -18,11 +21,13 @@ namespace BlueWater
|
|||||||
public void SetManagedPool(IObjectPool<Liquid> pool) => _managedPool = pool;
|
public void SetManagedPool(IObjectPool<Liquid> pool) => _managedPool = pool;
|
||||||
public void Destroy() => _managedPool.Release(this);
|
public void Destroy() => _managedPool.Release(this);
|
||||||
|
|
||||||
public void Initialize(LiquidController liquidController, Collider2D targetCollider, Color color)
|
public void Initialize(LiquidController liquidController, Collider2D targetCollider, Color color, Vector3 pushForce)
|
||||||
{
|
{
|
||||||
_liquidController = liquidController;
|
_liquidController = liquidController;
|
||||||
_targetCollider = targetCollider;
|
_targetCollider = targetCollider;
|
||||||
_spriteRenderer.color = color;
|
_spriteRenderer.color = color;
|
||||||
|
_rigidbody2D.linearVelocity = Vector2.zero;
|
||||||
|
_rigidbody2D.AddForce(pushForce, ForceMode2D.Impulse);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
|
@ -8,15 +8,19 @@ namespace BlueWater
|
|||||||
{
|
{
|
||||||
public class LiquidController : MonoBehaviour
|
public class LiquidController : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
#region Variables
|
||||||
|
|
||||||
|
[Title("컴포넌트")]
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private Renderer _renderTexture;
|
private Renderer _renderTexture;
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private Renderer _liquidRenderer;
|
private Renderer _liquidRenderer;
|
||||||
|
|
||||||
[SerializeField, Required]
|
[SerializeField]
|
||||||
private Liquid _liquidObject;
|
private Collider2D _reachedCollider;
|
||||||
|
|
||||||
|
[Title("스폰 데이터")]
|
||||||
[SerializeField, Required]
|
[SerializeField, Required]
|
||||||
private Transform _spawnTransform;
|
private Transform _spawnTransform;
|
||||||
|
|
||||||
@ -24,42 +28,57 @@ namespace BlueWater
|
|||||||
private Transform _spawnLocation;
|
private Transform _spawnLocation;
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private Collider2D _reachedCollider;
|
private Vector3 _pushDirection;
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private int _objectPoolCount = 1000;
|
private float _pushPower;
|
||||||
|
|
||||||
|
[Title("액체")]
|
||||||
|
[SerializeField, Required, Tooltip("액체 프리팹")]
|
||||||
|
private Liquid _liquidObject;
|
||||||
|
|
||||||
|
[SerializeField, Tooltip("떨어지는 액체의 색상")]
|
||||||
|
private Color _liquidColor = new(1f, 0.8431373f, 0f, 1f);
|
||||||
|
|
||||||
|
[SerializeField, Tooltip("초당 생성되는 액체 수(ml)")]
|
||||||
|
private int _liquidsPerSecond = 80;
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private Color _liquidColor = new(0f, 0.7294118f, 1f, 1f);
|
private int _maxLiquidCount = 400;
|
||||||
|
|
||||||
[SerializeField, Tooltip("1초에 차는 %")]
|
[SerializeField, Range(0f, 1f), Tooltip("목표 색상으로 변경되는데 걸리는 시간")]
|
||||||
private float _pouringRate = 20f;
|
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private int _liquidsPerSecond = 100;
|
|
||||||
|
|
||||||
[SerializeField, Range(0f, 100f)]
|
|
||||||
private float _currentLiquidAmount;
|
|
||||||
|
|
||||||
[SerializeField, Range(0f, 1f)]
|
|
||||||
private float _colorLerpSpeed = 0.5f;
|
private float _colorLerpSpeed = 0.5f;
|
||||||
|
|
||||||
|
[SerializeField, Range(1f, 5f), Tooltip("목표 색상 * 밝기")]
|
||||||
|
private float _colorIntensity = 2f;
|
||||||
|
|
||||||
|
[Title("오브젝트 풀링")]
|
||||||
|
[SerializeField, Tooltip("오브젝트 풀링 최대 개수")]
|
||||||
|
private int _objectPoolCount = 1000;
|
||||||
|
|
||||||
private IObjectPool<Liquid> _objectPool;
|
private IObjectPool<Liquid> _objectPool;
|
||||||
private List<Liquid> _activeLiquids = new();
|
private List<Liquid> _activeLiquids = new();
|
||||||
private Dictionary<Color, float> _colorTimes = new();
|
private Dictionary<Color, int> _colorCounts = new();
|
||||||
|
|
||||||
private Material _instanceMaterial;
|
private Material _instanceMaterial;
|
||||||
|
|
||||||
private bool _isPouring;
|
private bool _isPouring;
|
||||||
private float _startTime = float.PositiveInfinity;
|
private float _startTime = float.PositiveInfinity;
|
||||||
private float _endTime = float.PositiveInfinity;
|
private int _instanceLiquidCount;
|
||||||
|
private float _currentLiquidAmount;
|
||||||
|
private float _liquidReachedTime;
|
||||||
private float _timeInterval;
|
private float _timeInterval;
|
||||||
private float _liquidPerObject;
|
|
||||||
private Color _currentMixedColor = Color.black;
|
private Color _currentMixedColor = Color.black;
|
||||||
private Color _targetColor;
|
private Color _targetColor;
|
||||||
|
|
||||||
// Hashes
|
// Hashes
|
||||||
private static readonly int _liquidAmountHash = Shader.PropertyToID("_LiquidAmount");
|
private static readonly int _liquidAmountHash = Shader.PropertyToID("_LiquidAmount");
|
||||||
private static readonly int _liquidColorHash = Shader.PropertyToID("_LiquidColor");
|
private static readonly int _liquidColorHash = Shader.PropertyToID("_LiquidColor");
|
||||||
|
private static readonly int _renderTextureColorHash = Shader.PropertyToID("_Color");
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
// Unity events
|
||||||
|
#region Unity events
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
@ -72,7 +91,6 @@ namespace BlueWater
|
|||||||
_liquidRenderer.material = _instanceMaterial;
|
_liquidRenderer.material = _instanceMaterial;
|
||||||
|
|
||||||
_timeInterval = 1f / _liquidsPerSecond;
|
_timeInterval = 1f / _liquidsPerSecond;
|
||||||
_liquidPerObject = _pouringRate / _liquidsPerSecond;
|
|
||||||
_instanceMaterial.SetFloat(_liquidAmountHash, 0f);
|
_instanceMaterial.SetFloat(_liquidAmountHash, 0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,7 +98,7 @@ namespace BlueWater
|
|||||||
{
|
{
|
||||||
if (_isPouring)
|
if (_isPouring)
|
||||||
{
|
{
|
||||||
if (_currentLiquidAmount >= 100f)
|
if (_instanceLiquidCount >= _maxLiquidCount)
|
||||||
{
|
{
|
||||||
InActiveIsPouring();
|
InActiveIsPouring();
|
||||||
return;
|
return;
|
||||||
@ -90,41 +108,44 @@ namespace BlueWater
|
|||||||
{
|
{
|
||||||
_objectPool.Get();
|
_objectPool.Get();
|
||||||
|
|
||||||
if (_colorTimes.ContainsKey(_liquidColor))
|
if (!_colorCounts.TryAdd(_liquidColor, 1))
|
||||||
{
|
{
|
||||||
_colorTimes[_liquidColor] += _timeInterval;
|
_colorCounts[_liquidColor] += 1;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_colorTimes[_liquidColor] = _timeInterval;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_startTime = Time.time;
|
_startTime = Time.time;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_endTime + _colorLerpSpeed >= Time.time)
|
if (_liquidReachedTime + _colorLerpSpeed >= Time.time)
|
||||||
{
|
{
|
||||||
_currentMixedColor = Color.Lerp(_currentMixedColor, _targetColor, _colorLerpSpeed * Time.deltaTime);
|
_currentMixedColor = Color.Lerp(_currentMixedColor, _targetColor, _colorLerpSpeed * Time.deltaTime);
|
||||||
_instanceMaterial.SetColor(_liquidColorHash, _currentMixedColor);
|
_instanceMaterial.SetColor(_liquidColorHash, _currentMixedColor * _colorIntensity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
// Initialize methods
|
||||||
|
#region Initialize methods
|
||||||
|
|
||||||
public void Initialize()
|
public void Initialize()
|
||||||
{
|
{
|
||||||
|
_instanceLiquidCount = 0;
|
||||||
|
_currentLiquidAmount = 0f;
|
||||||
_currentMixedColor = _liquidColor;
|
_currentMixedColor = _liquidColor;
|
||||||
_instanceMaterial.SetColor(_liquidColorHash, _currentMixedColor);
|
_instanceMaterial.SetColor(_liquidColorHash, _currentMixedColor * _colorIntensity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
// Object pooling system
|
||||||
|
#region Object pooling system
|
||||||
|
|
||||||
private Liquid CreateObject()
|
private Liquid CreateObject()
|
||||||
{
|
{
|
||||||
var instance = Instantiate(_liquidObject, _spawnTransform.position, Quaternion.identity, _spawnLocation);
|
var instance = Instantiate(_liquidObject, _spawnTransform.position, Quaternion.identity, _spawnLocation);
|
||||||
instance.SetManagedPool(_objectPool);
|
instance.SetManagedPool(_objectPool);
|
||||||
instance.Initialize(this, _reachedCollider, _liquidColor);
|
|
||||||
if (_renderTexture && _renderTexture.material.GetColor("_Color") != _liquidColor)
|
|
||||||
{
|
|
||||||
_renderTexture.material.SetColor("_Color", _liquidColor);
|
|
||||||
}
|
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,12 +153,13 @@ namespace BlueWater
|
|||||||
{
|
{
|
||||||
liquid.transform.position = _spawnTransform.position;
|
liquid.transform.position = _spawnTransform.position;
|
||||||
liquid.transform.rotation = Quaternion.identity;
|
liquid.transform.rotation = Quaternion.identity;
|
||||||
liquid.Initialize(this, _reachedCollider, _liquidColor);
|
|
||||||
if (_renderTexture && _renderTexture.material.GetColor("_Color") != _liquidColor)
|
|
||||||
{
|
|
||||||
_renderTexture.material.SetColor("_Color", _liquidColor);
|
|
||||||
}
|
|
||||||
liquid.gameObject.SetActive(true);
|
liquid.gameObject.SetActive(true);
|
||||||
|
_instanceLiquidCount++;
|
||||||
|
liquid.Initialize(this, _reachedCollider, _liquidColor, _pushDirection.normalized * _pushPower);
|
||||||
|
if (_renderTexture && _renderTexture.material.GetColor(_renderTextureColorHash) != _liquidColor)
|
||||||
|
{
|
||||||
|
_renderTexture.material.SetColor(_renderTextureColorHash, _liquidColor);
|
||||||
|
}
|
||||||
_activeLiquids.Add(liquid);
|
_activeLiquids.Add(liquid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,40 +175,27 @@ namespace BlueWater
|
|||||||
_activeLiquids.Remove(liquid);
|
_activeLiquids.Remove(liquid);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Color MixColorsByTime()
|
#endregion
|
||||||
{
|
|
||||||
var totalTime = _colorTimes.Values.Sum();
|
|
||||||
|
|
||||||
// 혼합된 색상 초기화 (검은색)
|
// Custom methods
|
||||||
var mixedColor = Color.black;
|
#region Custom methods
|
||||||
|
|
||||||
// 색상 혼합
|
|
||||||
foreach (var element in _colorTimes)
|
|
||||||
{
|
|
||||||
var color = element.Key;
|
|
||||||
var time = element.Value;
|
|
||||||
var ratio = time / totalTime;
|
|
||||||
|
|
||||||
mixedColor += color * ratio;
|
|
||||||
}
|
|
||||||
|
|
||||||
mixedColor.a = 1f;
|
|
||||||
|
|
||||||
return mixedColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
[Button("기본 색상")]
|
[Button("기본 색상")]
|
||||||
private void DefaultColor() => _liquidColor = new Color(0f, 0.7294118f, 1f, 1f);
|
private void DefaultColor() => _liquidColor = new Color(1f, 0.8431373f, 0f, 1f);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 술 제조 과정 초기화 함수
|
||||||
|
/// </summary>
|
||||||
public void ReleaseAllObject()
|
public void ReleaseAllObject()
|
||||||
{
|
{
|
||||||
// 뒤에서부터 Remove해야 오류가 없음
|
// 리스트 삭제는 뒤에서부터 해야 오류가 없음
|
||||||
for (var i = _activeLiquids.Count - 1; i >= 0; i--)
|
for (var i = _activeLiquids.Count - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
_activeLiquids[i].Destroy();
|
_activeLiquids[i].Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
_colorTimes.Clear();
|
_colorCounts.Clear();
|
||||||
|
_instanceLiquidCount = 0;
|
||||||
_currentLiquidAmount = 0f;
|
_currentLiquidAmount = 0f;
|
||||||
_instanceMaterial.SetFloat(_liquidAmountHash, 0f);
|
_instanceMaterial.SetFloat(_liquidAmountHash, 0f);
|
||||||
}
|
}
|
||||||
@ -202,22 +211,48 @@ namespace BlueWater
|
|||||||
_isPouring = false;
|
_isPouring = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 사용된 색상의 비율에 맞게 색을 혼합시키는 함수
|
||||||
|
/// </summary>
|
||||||
|
private Color MixColorsByTime()
|
||||||
|
{
|
||||||
|
var totalCounts = _colorCounts.Values.Sum();
|
||||||
|
|
||||||
|
var mixedColor = Color.black;
|
||||||
|
|
||||||
|
foreach (var element in _colorCounts)
|
||||||
|
{
|
||||||
|
var color = element.Key;
|
||||||
|
var count = element.Value;
|
||||||
|
var ratio = count / (float)totalCounts;
|
||||||
|
|
||||||
|
mixedColor += color * ratio;
|
||||||
|
}
|
||||||
|
|
||||||
|
mixedColor.a = 1f;
|
||||||
|
|
||||||
|
return mixedColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 액체가 특정 오브젝트에 충돌했을 때, 실행해야하는 과정
|
||||||
|
/// </summary>
|
||||||
public void OnLiquidReached()
|
public void OnLiquidReached()
|
||||||
{
|
{
|
||||||
_endTime = Time.time;
|
_liquidReachedTime = Time.time;
|
||||||
// 컵에 채워진 액체의 양을 증가시킴
|
_currentLiquidAmount++;
|
||||||
_currentLiquidAmount += _liquidPerObject;
|
var liquidAmount = Mathf.Clamp(_currentLiquidAmount / _maxLiquidCount, 0f, 1f);
|
||||||
_currentLiquidAmount = Mathf.Clamp(_currentLiquidAmount, 0f, 100f);
|
|
||||||
var liquidAmount = _currentLiquidAmount * 0.01f;
|
|
||||||
_instanceMaterial.SetFloat(_liquidAmountHash, liquidAmount);
|
_instanceMaterial.SetFloat(_liquidAmountHash, liquidAmount);
|
||||||
_targetColor = MixColorsByTime();
|
_targetColor = MixColorsByTime();
|
||||||
//_instanceMaterial.SetColor(_liquidColorHash, MixColorsByTime());
|
|
||||||
|
|
||||||
// 액체가 100%에 도달하면 pouring을 멈춤
|
if (liquidAmount >= 1f)
|
||||||
if (_currentLiquidAmount >= 100f)
|
|
||||||
{
|
{
|
||||||
InActiveIsPouring();
|
InActiveIsPouring();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -10,7 +10,7 @@ namespace BlueWater
|
|||||||
{
|
{
|
||||||
[Title("드롭 아이템")]
|
[Title("드롭 아이템")]
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
protected int CharacterIdx;
|
protected string CharacterIdx;
|
||||||
|
|
||||||
[field: Title("체력")]
|
[field: Title("체력")]
|
||||||
[field: SerializeField]
|
[field: SerializeField]
|
||||||
@ -81,7 +81,7 @@ namespace BlueWater
|
|||||||
dieParticleInstance.Play();
|
dieParticleInstance.Play();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CharacterIdx != 0)
|
if (!string.IsNullOrEmpty(CharacterIdx))
|
||||||
{
|
{
|
||||||
ItemManager.Instance.ItemDropRandomPosition(CharacterIdx, transform.position, 0f);
|
ItemManager.Instance.ItemDropRandomPosition(CharacterIdx, transform.position, 0f);
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ namespace BlueWater
|
|||||||
|
|
||||||
_spineController.PlayAnimation(_dieAnimationName, false);
|
_spineController.PlayAnimation(_dieAnimationName, false);
|
||||||
|
|
||||||
if (CharacterIdx != 0)
|
if (!string.IsNullOrEmpty(CharacterIdx))
|
||||||
{
|
{
|
||||||
ItemManager.Instance.ItemDropRandomPosition(CharacterIdx, transform.position, 0f);
|
ItemManager.Instance.ItemDropRandomPosition(CharacterIdx, transform.position, 0f);
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ namespace BlueWater.Tycoons
|
|||||||
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(InputActionMaps.Bar);
|
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(InputActionMaps.Bar);
|
||||||
TycoonCameraManager.Instance.SetMainCamera(TycoonCameraType.Bar);
|
TycoonCameraManager.Instance.SetMainCamera(TycoonCameraType.Bar);
|
||||||
_liquidController.Initialize();
|
_liquidController.Initialize();
|
||||||
_liquidController2.Initialize();
|
//_liquidController2.Initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Escape()
|
public void Escape()
|
||||||
@ -30,18 +30,19 @@ namespace BlueWater.Tycoons
|
|||||||
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(InputActionMaps.Tycoon);
|
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(InputActionMaps.Tycoon);
|
||||||
TycoonCameraManager.Instance.SetMainCamera(TycoonCameraType.Base);
|
TycoonCameraManager.Instance.SetMainCamera(TycoonCameraType.Base);
|
||||||
_liquidController.ReleaseAllObject();
|
_liquidController.ReleaseAllObject();
|
||||||
|
//_liquidController2.ReleaseAllObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ActiveIsPouring()
|
public void ActiveIsPouring()
|
||||||
{
|
{
|
||||||
_liquidController.ActiveIsPouring();
|
_liquidController.ActiveIsPouring();
|
||||||
_liquidController2.ActiveIsPouring();
|
//_liquidController2.ActiveIsPouring();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void InActiveIsPouring()
|
public void InActiveIsPouring()
|
||||||
{
|
{
|
||||||
_liquidController.InActiveIsPouring();
|
_liquidController.InActiveIsPouring();
|
||||||
_liquidController2.InActiveIsPouring();
|
//_liquidController2.InActiveIsPouring();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -5,7 +5,7 @@ namespace BlueWater.Tycoons
|
|||||||
public class BeverageMachine : InteractionFurniture
|
public class BeverageMachine : InteractionFurniture
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private int _itemIdx = 40001;
|
private string _itemIdx = "40001";
|
||||||
|
|
||||||
public override void Interaction()
|
public override void Interaction()
|
||||||
{
|
{
|
||||||
|
@ -35,7 +35,7 @@ namespace BlueWater.Tycoons
|
|||||||
|
|
||||||
[FormerlySerializedAs("_fireWoodIdx")]
|
[FormerlySerializedAs("_fireWoodIdx")]
|
||||||
[SerializeField, BoxGroup("데이터")]
|
[SerializeField, BoxGroup("데이터")]
|
||||||
protected int FireWoodIdx = 70001;
|
protected string FireWoodIdx = "70001";
|
||||||
|
|
||||||
private Queue<FoodData> _cookedFoodDatas;
|
private Queue<FoodData> _cookedFoodDatas;
|
||||||
private int _currentFireWoodCount;
|
private int _currentFireWoodCount;
|
||||||
@ -59,7 +59,7 @@ namespace BlueWater.Tycoons
|
|||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (!IsOpened || CurrentDailyFoodUi.FoodData is null or { Idx : 0 }) return;
|
if (!IsOpened || CurrentDailyFoodUi.FoodData == null || string.IsNullOrEmpty(CurrentDailyFoodUi.FoodData.Idx)) return;
|
||||||
|
|
||||||
var level = _currentFireWoodCount / 5;
|
var level = _currentFireWoodCount / 5;
|
||||||
var currentFireWoodLevel = CookwareDataSo.FireWoodLevel[level];
|
var currentFireWoodLevel = CookwareDataSo.FireWoodLevel[level];
|
||||||
@ -160,7 +160,7 @@ namespace BlueWater.Tycoons
|
|||||||
|
|
||||||
protected override void OpenTycoonSwitch()
|
protected override void OpenTycoonSwitch()
|
||||||
{
|
{
|
||||||
if (CurrentDailyFoodUi.FoodData is not null and not { Idx : 0 })
|
if (CurrentDailyFoodUi.FoodData != null && !string.IsNullOrEmpty(CurrentDailyFoodUi.FoodData.Idx))
|
||||||
{
|
{
|
||||||
CookGauge.enabled = true;
|
CookGauge.enabled = true;
|
||||||
FireWoodQuantity.enabled = true;
|
FireWoodQuantity.enabled = true;
|
||||||
|
@ -5,7 +5,7 @@ namespace BlueWater.Tycoons
|
|||||||
public class FireWood : InteractionFurniture
|
public class FireWood : InteractionFurniture
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private int _itemIdx = 70001;
|
private string _itemIdx = "70001";
|
||||||
|
|
||||||
public override void Interaction()
|
public override void Interaction()
|
||||||
{
|
{
|
||||||
|
@ -23,11 +23,11 @@ MonoBehaviour:
|
|||||||
<IngredientQuantity1>k__BackingField: 1
|
<IngredientQuantity1>k__BackingField: 1
|
||||||
<IngredientIdx2>k__BackingField: 10706
|
<IngredientIdx2>k__BackingField: 10706
|
||||||
<IngredientQuantity2>k__BackingField: 1
|
<IngredientQuantity2>k__BackingField: 1
|
||||||
<IngredientIdx3>k__BackingField: 0
|
<IngredientIdx3>k__BackingField:
|
||||||
<IngredientQuantity3>k__BackingField: 0
|
<IngredientQuantity3>k__BackingField: 0
|
||||||
<IngredientIdx4>k__BackingField: 0
|
<IngredientIdx4>k__BackingField:
|
||||||
<IngredientQuantity4>k__BackingField: 0
|
<IngredientQuantity4>k__BackingField: 0
|
||||||
<IngredientIdx5>k__BackingField: 0
|
<IngredientIdx5>k__BackingField:
|
||||||
<IngredientQuantity5>k__BackingField: 0
|
<IngredientQuantity5>k__BackingField: 0
|
||||||
- <Idx>k__BackingField: 30002
|
- <Idx>k__BackingField: 30002
|
||||||
<Name>k__BackingField: "\uC5BC\uC74C\uB3C4\uCE58 \uD325\uBE59\uC218"
|
<Name>k__BackingField: "\uC5BC\uC74C\uB3C4\uCE58 \uD325\uBE59\uC218"
|
||||||
@ -39,11 +39,11 @@ MonoBehaviour:
|
|||||||
<IngredientQuantity1>k__BackingField: 1
|
<IngredientQuantity1>k__BackingField: 1
|
||||||
<IngredientIdx2>k__BackingField: 10706
|
<IngredientIdx2>k__BackingField: 10706
|
||||||
<IngredientQuantity2>k__BackingField: 1
|
<IngredientQuantity2>k__BackingField: 1
|
||||||
<IngredientIdx3>k__BackingField: 0
|
<IngredientIdx3>k__BackingField:
|
||||||
<IngredientQuantity3>k__BackingField: 0
|
<IngredientQuantity3>k__BackingField: 0
|
||||||
<IngredientIdx4>k__BackingField: 0
|
<IngredientIdx4>k__BackingField:
|
||||||
<IngredientQuantity4>k__BackingField: 0
|
<IngredientQuantity4>k__BackingField: 0
|
||||||
<IngredientIdx5>k__BackingField: 0
|
<IngredientIdx5>k__BackingField:
|
||||||
<IngredientQuantity5>k__BackingField: 0
|
<IngredientQuantity5>k__BackingField: 0
|
||||||
- <Idx>k__BackingField: 30003
|
- <Idx>k__BackingField: 30003
|
||||||
<Name>k__BackingField: "\uCF54\uBFD4\uC18C \uBFD4 \uD280\uAE40"
|
<Name>k__BackingField: "\uCF54\uBFD4\uC18C \uBFD4 \uD280\uAE40"
|
||||||
@ -57,9 +57,9 @@ MonoBehaviour:
|
|||||||
<IngredientQuantity2>k__BackingField: 1
|
<IngredientQuantity2>k__BackingField: 1
|
||||||
<IngredientIdx3>k__BackingField: 10704
|
<IngredientIdx3>k__BackingField: 10704
|
||||||
<IngredientQuantity3>k__BackingField: 1
|
<IngredientQuantity3>k__BackingField: 1
|
||||||
<IngredientIdx4>k__BackingField: 0
|
<IngredientIdx4>k__BackingField:
|
||||||
<IngredientQuantity4>k__BackingField: 0
|
<IngredientQuantity4>k__BackingField: 0
|
||||||
<IngredientIdx5>k__BackingField: 0
|
<IngredientIdx5>k__BackingField:
|
||||||
<IngredientQuantity5>k__BackingField: 0
|
<IngredientQuantity5>k__BackingField: 0
|
||||||
- <Idx>k__BackingField: 30004
|
- <Idx>k__BackingField: 30004
|
||||||
<Name>k__BackingField: "\uCF54\uBFD4\uC18C \uB4B7\uB2E4\uB9AC \uACE0\uAE30"
|
<Name>k__BackingField: "\uCF54\uBFD4\uC18C \uB4B7\uB2E4\uB9AC \uACE0\uAE30"
|
||||||
@ -73,9 +73,9 @@ MonoBehaviour:
|
|||||||
<IngredientQuantity2>k__BackingField: 1
|
<IngredientQuantity2>k__BackingField: 1
|
||||||
<IngredientIdx3>k__BackingField: 10701
|
<IngredientIdx3>k__BackingField: 10701
|
||||||
<IngredientQuantity3>k__BackingField: 1
|
<IngredientQuantity3>k__BackingField: 1
|
||||||
<IngredientIdx4>k__BackingField: 0
|
<IngredientIdx4>k__BackingField:
|
||||||
<IngredientQuantity4>k__BackingField: 0
|
<IngredientQuantity4>k__BackingField: 0
|
||||||
<IngredientIdx5>k__BackingField: 0
|
<IngredientIdx5>k__BackingField:
|
||||||
<IngredientQuantity5>k__BackingField: 0
|
<IngredientQuantity5>k__BackingField: 0
|
||||||
- <Idx>k__BackingField: 30005
|
- <Idx>k__BackingField: 30005
|
||||||
<Name>k__BackingField: "\uBC31\uC0C1\uC5B4 \uD1B5\uAD6C\uC774"
|
<Name>k__BackingField: "\uBC31\uC0C1\uC5B4 \uD1B5\uAD6C\uC774"
|
||||||
@ -91,7 +91,7 @@ MonoBehaviour:
|
|||||||
<IngredientQuantity3>k__BackingField: 1
|
<IngredientQuantity3>k__BackingField: 1
|
||||||
<IngredientIdx4>k__BackingField: 10704
|
<IngredientIdx4>k__BackingField: 10704
|
||||||
<IngredientQuantity4>k__BackingField: 1
|
<IngredientQuantity4>k__BackingField: 1
|
||||||
<IngredientIdx5>k__BackingField: 0
|
<IngredientIdx5>k__BackingField:
|
||||||
<IngredientQuantity5>k__BackingField: 0
|
<IngredientQuantity5>k__BackingField: 0
|
||||||
- <Idx>k__BackingField: 30006
|
- <Idx>k__BackingField: 30006
|
||||||
<Name>k__BackingField: "\uBC84\uD130 \uC870\uAC1C \uAD6C\uC774"
|
<Name>k__BackingField: "\uBC84\uD130 \uC870\uAC1C \uAD6C\uC774"
|
||||||
@ -105,7 +105,7 @@ MonoBehaviour:
|
|||||||
<IngredientQuantity2>k__BackingField: 1
|
<IngredientQuantity2>k__BackingField: 1
|
||||||
<IngredientIdx3>k__BackingField: 10705
|
<IngredientIdx3>k__BackingField: 10705
|
||||||
<IngredientQuantity3>k__BackingField: 1
|
<IngredientQuantity3>k__BackingField: 1
|
||||||
<IngredientIdx4>k__BackingField: 0
|
<IngredientIdx4>k__BackingField:
|
||||||
<IngredientQuantity4>k__BackingField: 0
|
<IngredientQuantity4>k__BackingField: 0
|
||||||
<IngredientIdx5>k__BackingField: 0
|
<IngredientIdx5>k__BackingField:
|
||||||
<IngredientQuantity5>k__BackingField: 0
|
<IngredientQuantity5>k__BackingField: 0
|
||||||
|
@ -15,7 +15,7 @@ namespace BlueWater.Tycoons
|
|||||||
[Title("손님 데이터")]
|
[Title("손님 데이터")]
|
||||||
[SerializeField, Required]
|
[SerializeField, Required]
|
||||||
private CustomerDataSo _customerDataSo;
|
private CustomerDataSo _customerDataSo;
|
||||||
private Dictionary<int, CustomerData> _customerDatas;
|
private Dictionary<string, CustomerData> _customerDatas;
|
||||||
|
|
||||||
[SerializeField, Required]
|
[SerializeField, Required]
|
||||||
private Customer _customerPrefab;
|
private Customer _customerPrefab;
|
||||||
@ -40,7 +40,7 @@ namespace BlueWater.Tycoons
|
|||||||
|
|
||||||
protected override void OnAwake()
|
protected override void OnAwake()
|
||||||
{
|
{
|
||||||
_customerDatas = new Dictionary<int, CustomerData>(_customerDataSo.CustomerDatas.Count);
|
_customerDatas = new Dictionary<string, CustomerData>(_customerDataSo.CustomerDatas.Count);
|
||||||
foreach (var element in _customerDataSo.CustomerDatas)
|
foreach (var element in _customerDataSo.CustomerDatas)
|
||||||
{
|
{
|
||||||
_customerDatas.TryAdd(element.Idx, element);
|
_customerDatas.TryAdd(element.Idx, element);
|
||||||
|
@ -82,7 +82,7 @@ namespace BlueWater
|
|||||||
|
|
||||||
MainCamera = GetComponent<Camera>();
|
MainCamera = GetComponent<Camera>();
|
||||||
_cinemachineBrain = GetComponent<CinemachineBrain>();
|
_cinemachineBrain = GetComponent<CinemachineBrain>();
|
||||||
UiCamera = MainCamera.transform.Find("UiCamera").GetComponent<Camera>();
|
//UiCamera = MainCamera.transform.Find("UiCamera").GetComponent<Camera>();
|
||||||
|
|
||||||
BaseCamera = cameraLocation.Find("BaseCamera").GetComponent<CinemachineCamera>();
|
BaseCamera = cameraLocation.Find("BaseCamera").GetComponent<CinemachineCamera>();
|
||||||
BarCamera = cameraLocation.Find("BarCamera").GetComponent<CinemachineCamera>();
|
BarCamera = cameraLocation.Find("BarCamera").GetComponent<CinemachineCamera>();
|
||||||
|
@ -194,7 +194,7 @@ namespace BlueWater.Uis
|
|||||||
|
|
||||||
public void CheckCookable()
|
public void CheckCookable()
|
||||||
{
|
{
|
||||||
if (_selectedFoodData == null || _selectedFoodData.Idx == 0)
|
if (_selectedFoodData == null || string.IsNullOrEmpty(_selectedFoodData.Idx))
|
||||||
{
|
{
|
||||||
_cookButton.interactable = false;
|
_cookButton.interactable = false;
|
||||||
_cookText.color = _cookButton.colors.disabledColor;
|
_cookText.color = _cookButton.colors.disabledColor;
|
||||||
|
@ -100,7 +100,7 @@ namespace BlueWater.Uis
|
|||||||
|
|
||||||
foreach (var element in selectedTypeItemSlotUis)
|
foreach (var element in selectedTypeItemSlotUis)
|
||||||
{
|
{
|
||||||
if (!element.GetIsLocked() && element.FoodData is null or { Idx: 0 })
|
if (!element.GetIsLocked() && element.FoodData == null || string.IsNullOrEmpty(element.FoodData.Idx))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -115,7 +115,7 @@ namespace BlueWater.Uis
|
|||||||
|
|
||||||
foreach (var element in selectedTypeItemSlotUis)
|
foreach (var element in selectedTypeItemSlotUis)
|
||||||
{
|
{
|
||||||
if (!element.GetIsLocked() && element.FoodData is null or { Idx: 0 })
|
if (!element.GetIsLocked() && element.FoodData == null || string.IsNullOrEmpty(element.FoodData.Idx))
|
||||||
{
|
{
|
||||||
element.SetFoodData(selectedFoodData);
|
element.SetFoodData(selectedFoodData);
|
||||||
DailyFoodSlotUis.Add(element);
|
DailyFoodSlotUis.Add(element);
|
||||||
@ -146,10 +146,10 @@ namespace BlueWater.Uis
|
|||||||
|
|
||||||
public bool CanOpen()
|
public bool CanOpen()
|
||||||
{
|
{
|
||||||
return _grillFoodSlotUis.Any(slot => slot.FoodData is not null and not { Idx: 0 }) ||
|
return _grillFoodSlotUis.Any(slot => slot.FoodData != null && !string.IsNullOrEmpty(slot.FoodData.Idx)) ||
|
||||||
_soupFoodSlotUis.Any(slot => slot.FoodData is not null and not { Idx: 0 }) ||
|
_soupFoodSlotUis.Any(slot => slot.FoodData != null && !string.IsNullOrEmpty(slot.FoodData.Idx)) ||
|
||||||
_skewerFoodSlotUis.Any(slot => slot.FoodData is not null and not { Idx: 0 }) ||
|
_skewerFoodSlotUis.Any(slot => slot.FoodData != null && !string.IsNullOrEmpty(slot.FoodData.Idx)) ||
|
||||||
_dessertPanFoodSlotUis.Any(slot => slot.FoodData is not null and not { Idx: 0 });
|
_dessertPanFoodSlotUis.Any(slot => slot.FoodData != null && !string.IsNullOrEmpty(slot.FoodData.Idx));
|
||||||
}
|
}
|
||||||
|
|
||||||
public TycoonItemSlotUi InitializeGrill(Grill grill)
|
public TycoonItemSlotUi InitializeGrill(Grill grill)
|
||||||
|
@ -56,7 +56,7 @@ namespace BlueWater.Uis
|
|||||||
public void ShowUi() => gameObject.SetActive(true);
|
public void ShowUi() => gameObject.SetActive(true);
|
||||||
public void HideUi() => gameObject.SetActive(false);
|
public void HideUi() => gameObject.SetActive(false);
|
||||||
|
|
||||||
public void SetFoodImage(int foodIdx)
|
public void SetFoodImage(string foodIdx)
|
||||||
{
|
{
|
||||||
_orderItemData = ItemManager.Instance.GetItemDataByIdx(foodIdx);
|
_orderItemData = ItemManager.Instance.GetItemDataByIdx(foodIdx);
|
||||||
if (_orderItemData == null)
|
if (_orderItemData == null)
|
||||||
@ -72,12 +72,12 @@ namespace BlueWater.Uis
|
|||||||
FoodImage.sprite = _orderItemData.Sprite;
|
FoodImage.sprite = _orderItemData.Sprite;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetFoodImage(Sprite sprite)
|
public void SetFoodSprite(Sprite sprite)
|
||||||
{
|
{
|
||||||
FoodImage.sprite = sprite;
|
FoodImage.sprite = sprite;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OrderFood(int foodIdx, int waitTime, int hurryTime)
|
public void OrderFood(string foodIdx, int waitTime, int hurryTime)
|
||||||
{
|
{
|
||||||
_isOrdered = true;
|
_isOrdered = true;
|
||||||
_isWaitTimeOver = false;
|
_isWaitTimeOver = false;
|
||||||
@ -99,7 +99,7 @@ namespace BlueWater.Uis
|
|||||||
_isOrdered = true;
|
_isOrdered = true;
|
||||||
_isWaitTimeOver = false;
|
_isWaitTimeOver = false;
|
||||||
_isFoodReceived = false;
|
_isFoodReceived = false;
|
||||||
SetFoodImage(DataManager.Instance.SpriteDataSo.Gold);
|
SetFoodSprite(DataManager.Instance.SpriteDataSo.Gold);
|
||||||
ShowUi();
|
ShowUi();
|
||||||
|
|
||||||
_tween = FillImage.DOFillAmount(1f, hurryTime)
|
_tween = FillImage.DOFillAmount(1f, hurryTime)
|
||||||
|
BIN
Assets/03.Images/Props/Environment/Ice.png
Normal file
BIN
Assets/03.Images/Props/Environment/Ice.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
143
Assets/03.Images/Props/Environment/Ice.png.meta
Normal file
143
Assets/03.Images/Props/Environment/Ice.png.meta
Normal file
@ -0,0 +1,143 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5317214c6c3a1d74c97c68e6ba525593
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 13
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 0
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
flipGreenChannel: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMipmapLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 1
|
||||||
|
wrapV: 1
|
||||||
|
wrapW: 0
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 1
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 512
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 8
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
swizzle: 50462976
|
||||||
|
cookieLightType: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 4
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
ignorePlatformSupport: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 4
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
ignorePlatformSupport: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 4
|
||||||
|
buildTarget: Android
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
ignorePlatformSupport: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 4
|
||||||
|
buildTarget: WindowsStoreApps
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
ignorePlatformSupport: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
customData:
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spriteCustomMetadata:
|
||||||
|
entries: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
mipmapLimitGroupName:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -118,10 +118,10 @@ Material:
|
|||||||
- _GlossMapScale: 0
|
- _GlossMapScale: 0
|
||||||
- _Glossiness: 0
|
- _Glossiness: 0
|
||||||
- _GlossyReflections: 0
|
- _GlossyReflections: 0
|
||||||
- _LiquidAmount: 0.662
|
- _LiquidAmount: 1
|
||||||
- _LiquidFrequency: 18
|
- _LiquidFrequency: 18
|
||||||
- _LiquidSpeed: 3
|
- _LiquidSpeed: 3
|
||||||
- _LiquidTopWidth: 5
|
- _LiquidTopWidth: 15
|
||||||
- _Metallic: 0
|
- _Metallic: 0
|
||||||
- _OcclusionStrength: 1
|
- _OcclusionStrength: 1
|
||||||
- _Parallax: 0.005
|
- _Parallax: 0.005
|
||||||
@ -138,6 +138,7 @@ Material:
|
|||||||
- _SrcBlendAlpha: 1
|
- _SrcBlendAlpha: 1
|
||||||
- _Surface: 0
|
- _Surface: 0
|
||||||
- _Test: 0
|
- _Test: 0
|
||||||
|
- _TopMaskHeight: 0.035
|
||||||
- _Visibility: 0.1
|
- _Visibility: 0.1
|
||||||
- _WaterFrequency: 10
|
- _WaterFrequency: 10
|
||||||
- _WaterLevel: 1
|
- _WaterLevel: 1
|
||||||
@ -152,7 +153,7 @@ Material:
|
|||||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
- _FillAmount: {r: 0, g: 0, b: 0, a: 0}
|
- _FillAmount: {r: 0, g: 0, b: 0, a: 0}
|
||||||
- _FormColor: {r: 0.4078431, g: 1.317647, b: 1.4980392, a: 0}
|
- _FormColor: {r: 0.4078431, g: 1.317647, b: 1.4980392, a: 0}
|
||||||
- _LiquidColor: {r: 0, g: 0.3513453, b: 1, a: 0}
|
- _LiquidColor: {r: 2, g: 1.6862745, b: 0, a: 0}
|
||||||
- _LiquidTopColor: {r: 1, g: 1, b: 1, a: 0}
|
- _LiquidTopColor: {r: 1, g: 1, b: 1, a: 0}
|
||||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
- _WaterColor: {r: 0, g: 1.5319147, b: 2, a: 0}
|
- _WaterColor: {r: 0, g: 1.5319147, b: 2, a: 0}
|
||||||
|
154
Assets/05.Prefabs/Ice.prefab
Normal file
154
Assets/05.Prefabs/Ice.prefab
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &4182144982868500803
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 7412895653495447626}
|
||||||
|
- component: {fileID: 2516316322156046459}
|
||||||
|
- component: {fileID: 8452260105535798107}
|
||||||
|
- component: {fileID: 8043191264785836122}
|
||||||
|
m_Layer: 8
|
||||||
|
m_Name: Ice
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &7412895653495447626
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4182144982868500803}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 330.7, y: 17.7, z: 0}
|
||||||
|
m_LocalScale: {x: 5, y: 5, z: 5}
|
||||||
|
m_ConstrainProportionsScale: 1
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!212 &2516316322156046459
|
||||||
|
SpriteRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4182144982868500803}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 0
|
||||||
|
m_ReceiveShadows: 0
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 0
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||||
|
m_RayTracingAccelStructBuildFlags: 1
|
||||||
|
m_SmallMeshCulling: 1
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 0
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 2
|
||||||
|
m_Sprite: {fileID: 21300000, guid: 5317214c6c3a1d74c97c68e6ba525593, type: 3}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_FlipX: 0
|
||||||
|
m_FlipY: 0
|
||||||
|
m_DrawMode: 0
|
||||||
|
m_Size: {x: 1, y: 1}
|
||||||
|
m_AdaptiveModeThreshold: 0.5
|
||||||
|
m_SpriteTileMode: 0
|
||||||
|
m_WasSpriteAssigned: 1
|
||||||
|
m_MaskInteraction: 0
|
||||||
|
m_SpriteSortPoint: 0
|
||||||
|
--- !u!50 &8452260105535798107
|
||||||
|
Rigidbody2D:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4182144982868500803}
|
||||||
|
m_BodyType: 0
|
||||||
|
m_Simulated: 1
|
||||||
|
m_UseFullKinematicContacts: 0
|
||||||
|
m_UseAutoMass: 0
|
||||||
|
m_Mass: 50
|
||||||
|
m_LinearDamping: 0
|
||||||
|
m_AngularDamping: 0.05
|
||||||
|
m_GravityScale: 3
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_Interpolate: 0
|
||||||
|
m_SleepingMode: 1
|
||||||
|
m_CollisionDetection: 0
|
||||||
|
m_Constraints: 0
|
||||||
|
--- !u!58 &8043191264785836122
|
||||||
|
CircleCollider2D:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4182144982868500803}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Density: 1
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_ForceSendLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_ForceReceiveLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_ContactCaptureLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_CallbackLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_UsedByEffector: 0
|
||||||
|
m_CompositeOperation: 0
|
||||||
|
m_CompositeOrder: 0
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Radius: 0.45
|
7
Assets/05.Prefabs/Ice.prefab.meta
Normal file
7
Assets/05.Prefabs/Ice.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c5e5fa01b84c9f64ba05b7c9f481acc1
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -166,4 +166,5 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
_spriteRenderer: {fileID: 3772201455671009312}
|
_spriteRenderer: {fileID: 3772201455671009312}
|
||||||
|
_rigidbody2D: {fileID: 3470010340248184897}
|
||||||
_distanceThreshold: 0.5
|
_distanceThreshold: 0.5
|
||||||
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -10,11 +10,11 @@
|
|||||||
"IngredientQuantity1": 1,
|
"IngredientQuantity1": 1,
|
||||||
"IngredientIdx2": 10706,
|
"IngredientIdx2": 10706,
|
||||||
"IngredientQuantity2": 1,
|
"IngredientQuantity2": 1,
|
||||||
"IngredientIdx3": 0,
|
"IngredientIdx3": "",
|
||||||
"IngredientQuantity3": 0,
|
"IngredientQuantity3": 0,
|
||||||
"IngredientIdx4": 0,
|
"IngredientIdx4": "",
|
||||||
"IngredientQuantity4": 0,
|
"IngredientQuantity4": 0,
|
||||||
"IngredientIdx5": 0,
|
"IngredientIdx5": "",
|
||||||
"IngredientQuantity5": 0
|
"IngredientQuantity5": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -28,11 +28,11 @@
|
|||||||
"IngredientQuantity1": 1,
|
"IngredientQuantity1": 1,
|
||||||
"IngredientIdx2": 10706,
|
"IngredientIdx2": 10706,
|
||||||
"IngredientQuantity2": 1,
|
"IngredientQuantity2": 1,
|
||||||
"IngredientIdx3": 0,
|
"IngredientIdx3": "",
|
||||||
"IngredientQuantity3": 0,
|
"IngredientQuantity3": 0,
|
||||||
"IngredientIdx4": 0,
|
"IngredientIdx4": "",
|
||||||
"IngredientQuantity4": 0,
|
"IngredientQuantity4": 0,
|
||||||
"IngredientIdx5": 0,
|
"IngredientIdx5": "",
|
||||||
"IngredientQuantity5": 0
|
"IngredientQuantity5": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -48,9 +48,9 @@
|
|||||||
"IngredientQuantity2": 1,
|
"IngredientQuantity2": 1,
|
||||||
"IngredientIdx3": 10704,
|
"IngredientIdx3": 10704,
|
||||||
"IngredientQuantity3": 1,
|
"IngredientQuantity3": 1,
|
||||||
"IngredientIdx4": 0,
|
"IngredientIdx4": "",
|
||||||
"IngredientQuantity4": 0,
|
"IngredientQuantity4": 0,
|
||||||
"IngredientIdx5": 0,
|
"IngredientIdx5": "",
|
||||||
"IngredientQuantity5": 0
|
"IngredientQuantity5": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -66,9 +66,9 @@
|
|||||||
"IngredientQuantity2": 1,
|
"IngredientQuantity2": 1,
|
||||||
"IngredientIdx3": 10701,
|
"IngredientIdx3": 10701,
|
||||||
"IngredientQuantity3": 1,
|
"IngredientQuantity3": 1,
|
||||||
"IngredientIdx4": 0,
|
"IngredientIdx4": "",
|
||||||
"IngredientQuantity4": 0,
|
"IngredientQuantity4": 0,
|
||||||
"IngredientIdx5": 0,
|
"IngredientIdx5": "",
|
||||||
"IngredientQuantity5": 0
|
"IngredientQuantity5": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -86,7 +86,7 @@
|
|||||||
"IngredientQuantity3": 1,
|
"IngredientQuantity3": 1,
|
||||||
"IngredientIdx4": 10704,
|
"IngredientIdx4": 10704,
|
||||||
"IngredientQuantity4": 1,
|
"IngredientQuantity4": 1,
|
||||||
"IngredientIdx5": 0,
|
"IngredientIdx5": "",
|
||||||
"IngredientQuantity5": 0
|
"IngredientQuantity5": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -102,9 +102,9 @@
|
|||||||
"IngredientQuantity2": 1,
|
"IngredientQuantity2": 1,
|
||||||
"IngredientIdx3": 10705,
|
"IngredientIdx3": 10705,
|
||||||
"IngredientQuantity3": 1,
|
"IngredientQuantity3": 1,
|
||||||
"IngredientIdx4": 0,
|
"IngredientIdx4": "",
|
||||||
"IngredientQuantity4": 0,
|
"IngredientQuantity4": 0,
|
||||||
"IngredientIdx5": 0,
|
"IngredientIdx5": "",
|
||||||
"IngredientQuantity5": 0
|
"IngredientQuantity5": 0
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -45,5 +45,8 @@ TagManager:
|
|||||||
- name: Default
|
- name: Default
|
||||||
uniqueID: 0
|
uniqueID: 0
|
||||||
locked: 0
|
locked: 0
|
||||||
|
- name: Ui
|
||||||
|
uniqueID: 3891178611
|
||||||
|
locked: 0
|
||||||
m_RenderingLayers:
|
m_RenderingLayers:
|
||||||
- Default
|
- Default
|
||||||
|
Loading…
Reference in New Issue
Block a user