diff --git a/Assets/01.Scenes/01.Tycoon_1.unity b/Assets/01.Scenes/01.Tycoon_1.unity index 3ee57011f..7f5491c8f 100644 --- a/Assets/01.Scenes/01.Tycoon_1.unity +++ b/Assets/01.Scenes/01.Tycoon_1.unity @@ -6000,7 +6000,7 @@ Transform: m_GameObject: {fileID: 545850347} serializedVersion: 2 m_LocalRotation: {x: 0.3420201, y: 0, z: 0, w: 0.9396927} - m_LocalPosition: {x: 12.92, y: 25.711502, z: -20.48178} + m_LocalPosition: {x: 0, y: 25.711502, z: -30.64178} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -9492,7 +9492,7 @@ Transform: m_GameObject: {fileID: 873223985} serializedVersion: 2 m_LocalRotation: {x: 0.3420201, y: 0, z: 0, w: 0.9396927} - m_LocalPosition: {x: 12.92, y: 25.711502, z: -20.48178} + m_LocalPosition: {x: 0, y: 25.711502, z: -30.64178} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -18687,10 +18687,22 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _persistent: 0 + k__BackingField: 3 + CurrentHeart: 0 + Invincibility: 0 + k__BackingField: 1 + k__BackingField: 1000 + k__BackingField: 1000 + k__BackingField: 1000 + k__BackingField: 1000 + k__BackingField: 1000 + k__BackingField: 1000 + k__BackingField: 1000 k__BackingField: {fileID: 1665075870} k__BackingField: {fileID: 1665075872} _dailyBgm: TycoonDailyBgm1 _levelDataSo: {fileID: 11400000, guid: 702b1ed0ce71d1b4aa1ddbce67e475a1, type: 2} + _cardDataSo: {fileID: 11400000, guid: 4607b374e49ab734da548949f9e10fed, type: 2} --- !u!114 &1665075870 MonoBehaviour: m_ObjectHideFlags: 0 @@ -22750,11 +22762,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1918605129} m_CullTransparentMesh: 1 ---- !u!224 &1922657173 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 7324957763114792098, guid: cf200ba34deabdb41847ac49e53704be, type: 3} - m_PrefabInstance: {fileID: 5927997630726898571} - m_PrefabAsset: {fileID: 0} --- !u!1001 &1924794515 PrefabInstance: m_ObjectHideFlags: 0 @@ -24136,6 +24143,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 2046925917} + - component: {fileID: 2046925918} m_Layer: 5 m_Name: SelectCardUi m_TagString: Untagged @@ -24154,8 +24162,7 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1922657173} + m_Children: [] m_Father: {fileID: 1049919592} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} @@ -24163,6 +24170,21 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 100, y: 100} m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2046925918 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2046925916} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3dd7358ce993836479029d580437bb79, type: 3} + m_Name: + m_EditorClassIdentifier: + Card01: {fileID: 7279465393450390489, guid: cf200ba34deabdb41847ac49e53704be, type: 3} + Card02: {fileID: 7279465393450390489, guid: cf200ba34deabdb41847ac49e53704be, type: 3} + Card03: {fileID: 7279465393450390489, guid: cf200ba34deabdb41847ac49e53704be, type: 3} --- !u!1 &2048187805 GameObject: m_ObjectHideFlags: 0 @@ -25614,7 +25636,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 2798544366308408093, guid: 9ce588004bafc1e4e9617fdaa2d77c8d, type: 3} propertyPath: m_LocalPosition.x - value: 12.92 + value: 0 objectReference: {fileID: 0} - target: {fileID: 2798544366308408093, guid: 9ce588004bafc1e4e9617fdaa2d77c8d, type: 3} propertyPath: m_LocalPosition.y @@ -25622,7 +25644,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 2798544366308408093, guid: 9ce588004bafc1e4e9617fdaa2d77c8d, type: 3} propertyPath: m_LocalPosition.z - value: 10.16 + value: 0 objectReference: {fileID: 0} - target: {fileID: 2798544366308408093, guid: 9ce588004bafc1e4e9617fdaa2d77c8d, type: 3} propertyPath: m_LocalRotation.w @@ -27021,107 +27043,6 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 9ce588004bafc1e4e9617fdaa2d77c8d, type: 3} ---- !u!1001 &5927997630726898571 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 2046925917} - m_Modifications: - - target: {fileID: 1599447962287829390, guid: cf200ba34deabdb41847ac49e53704be, type: 3} - propertyPath: m_IsActive - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7324957763114792098, guid: cf200ba34deabdb41847ac49e53704be, type: 3} - propertyPath: m_Pivot.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 7324957763114792098, guid: cf200ba34deabdb41847ac49e53704be, type: 3} - propertyPath: m_Pivot.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 7324957763114792098, guid: cf200ba34deabdb41847ac49e53704be, type: 3} - propertyPath: m_AnchorMax.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 7324957763114792098, guid: cf200ba34deabdb41847ac49e53704be, type: 3} - propertyPath: m_AnchorMax.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 7324957763114792098, guid: cf200ba34deabdb41847ac49e53704be, type: 3} - propertyPath: m_AnchorMin.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 7324957763114792098, guid: cf200ba34deabdb41847ac49e53704be, type: 3} - propertyPath: m_AnchorMin.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 7324957763114792098, guid: cf200ba34deabdb41847ac49e53704be, type: 3} - propertyPath: m_SizeDelta.x - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7324957763114792098, guid: cf200ba34deabdb41847ac49e53704be, type: 3} - propertyPath: m_SizeDelta.y - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7324957763114792098, guid: cf200ba34deabdb41847ac49e53704be, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7324957763114792098, guid: cf200ba34deabdb41847ac49e53704be, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7324957763114792098, guid: cf200ba34deabdb41847ac49e53704be, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7324957763114792098, guid: cf200ba34deabdb41847ac49e53704be, type: 3} - propertyPath: m_LocalRotation.w - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7324957763114792098, guid: cf200ba34deabdb41847ac49e53704be, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7324957763114792098, guid: cf200ba34deabdb41847ac49e53704be, type: 3} - propertyPath: m_LocalRotation.y - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7324957763114792098, guid: cf200ba34deabdb41847ac49e53704be, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7324957763114792098, guid: cf200ba34deabdb41847ac49e53704be, type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7324957763114792098, guid: cf200ba34deabdb41847ac49e53704be, type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7324957763114792098, guid: cf200ba34deabdb41847ac49e53704be, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7324957763114792098, guid: cf200ba34deabdb41847ac49e53704be, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 180 - objectReference: {fileID: 0} - - target: {fileID: 7324957763114792098, guid: cf200ba34deabdb41847ac49e53704be, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8510161667227778467, guid: cf200ba34deabdb41847ac49e53704be, type: 3} - propertyPath: m_Name - value: Card - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: cf200ba34deabdb41847ac49e53704be, type: 3} --- !u!1001 &7827484746149782377 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/02.Scripts/CustomInspector.cs b/Assets/02.Scripts/CustomInspector.cs new file mode 100644 index 000000000..88afd3079 --- /dev/null +++ b/Assets/02.Scripts/CustomInspector.cs @@ -0,0 +1,66 @@ +using System; + +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; + +[CustomPropertyDrawer(typeof(CLabelAttribute))] +public class CLabelPropertyDrawer : PropertyDrawer +{ + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + CLabelAttribute labelAttribute = (CLabelAttribute)attribute; + label.text = labelAttribute.label; // 커스텀 레이블로 텍스트 변경 + EditorGUI.PropertyField(position, property, label); + } +} + +[CustomPropertyDrawer(typeof(CLabeledRangeAttribute))] +public class LabeledRangeDrawer : PropertyDrawer +{ + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + CLabeledRangeAttribute range = (CLabeledRangeAttribute)attribute; + + // 기본 레이블을 이용해서 새로운 레이블을 설정 + EditorGUI.BeginProperty(position, label, property); + + // 범위 슬라이더 UI + if (property.propertyType == SerializedPropertyType.Float) + { + EditorGUI.Slider(position, property, range.min, range.max, new GUIContent(range.label)); + } + else if (property.propertyType == SerializedPropertyType.Integer) + { + EditorGUI.IntSlider(position, property, (int)range.min, (int)range.max, new GUIContent(range.label)); + } + + EditorGUI.EndProperty(); + } +} + +#endif + +public class CLabelAttribute : PropertyAttribute +{ + public string label; + + public CLabelAttribute(string label) + { + this.label = label; + } +} + +public class CLabeledRangeAttribute : PropertyAttribute +{ + public string label; + public float min; + public float max; + + public CLabeledRangeAttribute(string label, float min, float max) + { + this.label = label; + this.min = min; + this.max = max; + } +} diff --git a/Assets/02.Scripts/CustomInspector.cs.meta b/Assets/02.Scripts/CustomInspector.cs.meta new file mode 100644 index 000000000..fe8fb5d8e --- /dev/null +++ b/Assets/02.Scripts/CustomInspector.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 34747461cfcbe594f900eb776ba59116 \ No newline at end of file diff --git a/Assets/02.Scripts/DataManager.cs b/Assets/02.Scripts/DataManager.cs index 39159dba7..798dcb613 100644 --- a/Assets/02.Scripts/DataManager.cs +++ b/Assets/02.Scripts/DataManager.cs @@ -1,4 +1,4 @@ -using System; + using System; using System.Collections.Generic; using BlueWater.Items; using BlueWater.Tycoons; diff --git a/Assets/02.Scripts/Editor/JsonHelperEditor.cs b/Assets/02.Scripts/Editor/JsonHelperEditor.cs index 400f3b540..5cace095b 100644 --- a/Assets/02.Scripts/Editor/JsonHelperEditor.cs +++ b/Assets/02.Scripts/Editor/JsonHelperEditor.cs @@ -21,7 +21,8 @@ namespace BlueWater.Editors FoodDataTable, CocktailDataTable, DrinkDataTable, - LevelDataTable + LevelDataTable, + CardDataTable, } private string _jsonFilePath = "Assets/Resources/Json/FileName"; @@ -90,6 +91,9 @@ namespace BlueWater.Editors case DataType.LevelDataTable: LoadData(); break; + case DataType.CardDataTable: + LoadData(); + break; default: EditorUtility.DisplayDialog("경고 메세지", "데이터 타입이 제대로 설정되어있는지 확인해주세요.", "OK"); Debug.LogError("데이터 타입이 제대로 설정되어있는지 확인해주세요."); diff --git a/Assets/02.Scripts/Interface/IDataContainer.cs b/Assets/02.Scripts/Interface/IDataContainer.cs index af0e671fd..a2c0df3b9 100644 --- a/Assets/02.Scripts/Interface/IDataContainer.cs +++ b/Assets/02.Scripts/Interface/IDataContainer.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; + using System.Collections.Generic; namespace BlueWater.Interfaces { diff --git a/Assets/02.Scripts/ScriptableObject/CardDataTable.asset b/Assets/02.Scripts/ScriptableObject/CardDataTable.asset new file mode 100644 index 000000000..ecb2f585a --- /dev/null +++ b/Assets/02.Scripts/ScriptableObject/CardDataTable.asset @@ -0,0 +1,107 @@ +%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: c2b2766be55cd5143abce97e8c22303b, type: 3} + m_Name: CardDataTable + m_EditorClassIdentifier: + k__BackingField: + - k__BackingField: AddAllLiquid + k__BackingField: LiquidAllHealImg + k__BackingField: "\uC804\uCCB4 \uC7AC\uB8CC 1000ml \uCD94\uAC00" + k__BackingField: 0 + k__BackingField: 10 + - k__BackingField: AddGarnish1 + k__BackingField: Garnish1Img + k__BackingField: "1\uBC88 \uAC00\uB2C8\uC26C\uB97C 4000ml \uCD94\uAC00" + k__BackingField: 0 + k__BackingField: 5 + - k__BackingField: AddGarnish2 + k__BackingField: Garnish2Img + k__BackingField: "2\uBC88 \uAC00\uB2C8\uC26C\uB97C 4000ml \uCD94\uAC00" + k__BackingField: 0 + k__BackingField: 5 + - k__BackingField: AddLiquidB + k__BackingField: LiquidBImg + k__BackingField: "B \uC220\uC744 4000ml \uCD94\uAC00" + k__BackingField: 0 + k__BackingField: 5 + - k__BackingField: AddLiquidC + k__BackingField: LiquidCImg + k__BackingField: "C \uC220\uC744 4000ml \uCD94\uAC00" + k__BackingField: 0 + k__BackingField: 5 + - k__BackingField: AddLiquidD + k__BackingField: LiquidDImg + k__BackingField: "D \uC220\uC744 4000ml \uCD94\uAC00" + k__BackingField: 0 + k__BackingField: 5 + - k__BackingField: AddLiquidE + k__BackingField: LiquidEImg + k__BackingField: "E \uC220\uC744 4000ml \uCD94\uAC00" + k__BackingField: 0 + k__BackingField: 5 + - k__BackingField: ChefNpc + k__BackingField: ChefNpcImg + k__BackingField: "\uBC14\uD150\uD130 \uC885\uC5C5\uC6D0 \uCD94\uAC00" + k__BackingField: 5 + k__BackingField: 5 + - k__BackingField: CleanerNpc + k__BackingField: CleanerNpcImg + k__BackingField: "\uCCAD\uC18C \uC885\uC5C5\uC6D0 \uCD94\uAC00" + k__BackingField: 5 + k__BackingField: 5 + - k__BackingField: CleanUp + k__BackingField: CleanUpImgImg + k__BackingField: "\uB808\uC2A4\uD1A0\uB791 \uD55C\uBC88\uC5D0 \uCCAD\uC18C" + k__BackingField: 0 + k__BackingField: 5 + - k__BackingField: ExpGetUp + k__BackingField: ExpGetUpImg + k__BackingField: "\uACBD\uD5D8\uCE58 \uD68D\uB4DD 5% \uC99D\uAC00" + k__BackingField: 10 + k__BackingField: 5 + - k__BackingField: GoldGetUp + k__BackingField: GoldGetUpImg + k__BackingField: "\uACE8\uB4DC \uD68D\uB4DD 5% \uC99D\uAC00" + k__BackingField: 10 + k__BackingField: 5 + - k__BackingField: GuageReset + k__BackingField: GuageResetImg + k__BackingField: "\uBAA8\uB4E0 \uC190\uB2D8\uB4E4\uC758 \uAE30\uB2E4\uB9BC + \uCD08\uAE30\uD654" + k__BackingField: 0 + k__BackingField: 5 + - k__BackingField: HeartAllHeal + k__BackingField: HeartAllHealImg + k__BackingField: "\uD558\uD2B8 \uC804\uCCB4 \uD68C\uBCF5" + k__BackingField: 0 + k__BackingField: 5 + - k__BackingField: HeartHeal + k__BackingField: HeartHealImg + k__BackingField: "\uD558\uD2B8 \uD558\uB098 \uD68C\uBCF5" + k__BackingField: 10 + k__BackingField: 10 + - k__BackingField: HeartPlus + k__BackingField: HeartPlusImg + k__BackingField: "\uD558\uD2B8 \uD558\uB098 \uCD94\uAC00" + k__BackingField: 10 + k__BackingField: 5 + - k__BackingField: ServerNpc + k__BackingField: ServerNpcImg + k__BackingField: "\uC11C\uBE59 \uC885\uC5C5\uC6D0 \uCD94\uAC00" + k__BackingField: 5 + k__BackingField: 5 + - k__BackingField: SpeedUp + k__BackingField: SpeedUpImg + k__BackingField: "\uD50C\uB808\uC774\uC5B4 \uC774\uB3D9 \uC18D\uB3C4 + 5% \uC99D\uAC00" + k__BackingField: 10 + k__BackingField: 5 diff --git a/Assets/02.Scripts/ScriptableObject/CardDataTable.asset.meta b/Assets/02.Scripts/ScriptableObject/CardDataTable.asset.meta new file mode 100644 index 000000000..024ddb78c --- /dev/null +++ b/Assets/02.Scripts/ScriptableObject/CardDataTable.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4607b374e49ab734da548949f9e10fed +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/02.Scripts/Tycoon/CardData.cs b/Assets/02.Scripts/Tycoon/CardData.cs new file mode 100644 index 000000000..86dd8ed5f --- /dev/null +++ b/Assets/02.Scripts/Tycoon/CardData.cs @@ -0,0 +1,29 @@ +using System; +using BlueWater.Interfaces; +using Newtonsoft.Json; +using Sirenix.OdinInspector; +using UnityEngine; + +namespace BlueWater +{ + + [Serializable] + public class CardData : IIdx + { + [BoxGroup("Json 데이터 영역")] + [field: SerializeField, Tooltip("Idx"), BoxGroup("Json 데이터 영역")] + public string Idx { get; set; } + + [field: SerializeField, Tooltip("이미지"), BoxGroup("Json 데이터 영역")] + public string Img { get; set; } + + [field: SerializeField, Tooltip("Text"), BoxGroup("Json 데이터 영역")] + public string ScriptText { get; set; } + + [field: SerializeField, Tooltip("최대 값"), BoxGroup("Json 데이터 영역")] + public int Max { get; set; } + + [field: SerializeField, Tooltip("비율(%)"), BoxGroup("Json 데이터 영역")] + public int Ratio { get; set; } + } +} \ No newline at end of file diff --git a/Assets/02.Scripts/Tycoon/CardData.cs.meta b/Assets/02.Scripts/Tycoon/CardData.cs.meta new file mode 100644 index 000000000..8d3817178 --- /dev/null +++ b/Assets/02.Scripts/Tycoon/CardData.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 4a5692fbb32bfe64bb3da18c96d7032d diff --git a/Assets/02.Scripts/Tycoon/CardDataSo.cs b/Assets/02.Scripts/Tycoon/CardDataSo.cs new file mode 100644 index 000000000..cbabf5a03 --- /dev/null +++ b/Assets/02.Scripts/Tycoon/CardDataSo.cs @@ -0,0 +1,11 @@ +using BlueWater.Items; +using UnityEngine; + +namespace BlueWater +{ + [CreateAssetMenu(fileName = "CardTable", menuName = "ScriptableObjects/CardTable")] + public class CardDataSo : DataSo + { + + } +} \ No newline at end of file diff --git a/Assets/02.Scripts/Tycoon/CardDataSo.cs.meta b/Assets/02.Scripts/Tycoon/CardDataSo.cs.meta new file mode 100644 index 000000000..6ade08b45 --- /dev/null +++ b/Assets/02.Scripts/Tycoon/CardDataSo.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: c2b2766be55cd5143abce97e8c22303b diff --git a/Assets/02.Scripts/Tycoon/CustomerTableController.cs b/Assets/02.Scripts/Tycoon/CustomerTableController.cs index be96dbb18..fbc7b77ef 100644 --- a/Assets/02.Scripts/Tycoon/CustomerTableController.cs +++ b/Assets/02.Scripts/Tycoon/CustomerTableController.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using BlueWater.Utility; using UnityEngine; -using Random = System.Random; +using Random = System.Random; namespace BlueWater.Tycoons { diff --git a/Assets/02.Scripts/Tycoon/TycoonManager.cs b/Assets/02.Scripts/Tycoon/TycoonManager.cs index c23f7d4c2..b0e5fa2ce 100644 --- a/Assets/02.Scripts/Tycoon/TycoonManager.cs +++ b/Assets/02.Scripts/Tycoon/TycoonManager.cs @@ -5,10 +5,41 @@ using BlueWater.Audios; using UnityEngine; using Sirenix.OdinInspector; + namespace BlueWater.Tycoons { public class TycoonManager : Singleton { + + [field: Title("캐릭터 스테이터스")] + [field: SerializeField, CLabel("최대 체력")] + public int MaxHeart { get; set; } = 3; + + [field: SerializeField, CLabel("현재 체력")] + private int CurrentHeart; + [field: SerializeField, CLabel("무적")] + public bool Invincibility = false; + public int _CurrentHeart { get => CurrentHeart; set { if (!Invincibility) { CurrentHeart = value;}}} + + [field: SerializeField, CLabel("이동 속도")] + public float Chracter_Speed { get; set; } = 1.0f; + + [field: Title("음식 스테이터스")] + [field: SerializeField, CLabel("Liquid A")] + public int LiquidA { get; set; } = 1000; + [field: SerializeField, CLabel("Liquid B")] + public int LiquidB { get; set; } = 1000; + [field: SerializeField, CLabel("Liquid C")] + public int LiquidC { get; set; } = 1000; + [field: SerializeField, CLabel("Liquid D")] + public int LiquidD { get; set; } = 1000; + [field: SerializeField, CLabel("Liquid E")] + public int LiquidE { get; set; } = 1000; + [field: SerializeField, CLabel("Garnish A")] + public int GarnishA { get; set; } = 1000; + [field: SerializeField, CLabel("Garnish B")] + public int GarnishB { get; set; } = 1000; + [field: Title("컴포넌트")] [field: SerializeField] public CustomerTableController CustomerTableController { get; private set; } @@ -23,13 +54,20 @@ namespace BlueWater.Tycoons private LevelDataSo _levelDataSo; private Dictionary _levelDatas; + [SerializeField, Required] + private CardDataSo _cardDataSo; + private Dictionary _cardDatas; + public Action OnTycoonOpenedEvent; public Action OnTycoonClosedEvent; + + protected override void OnAwake() { InitializeComponents(); _levelDatas = InitializeDictionary(_levelDataSo.Datas, data => data.Idx); + _cardDatas = InitializeDictionary(_cardDataSo.Datas, data => data.Idx); } private void Start() @@ -46,6 +84,7 @@ namespace BlueWater.Tycoons CustomerTableController = GetComponent(); TycoonStageController = GetComponent(); } + private Dictionary InitializeDictionary(List dataList, Func keySelector) { @@ -61,7 +100,13 @@ namespace BlueWater.Tycoons return null; } + public int GetTotalItemCount(Dictionary dataDictionary) + { + return dataDictionary.Count; + } + public LevelData GetLevelDataByIdx(string idx) => GetDataByIdx(_levelDatas, idx); + public CardData GetCardDataByIdx(string idx) => GetDataByIdx(_cardDatas, idx); } } \ No newline at end of file diff --git a/Assets/02.Scripts/Ui/Tycoon/TycoonCard.cs b/Assets/02.Scripts/Ui/Tycoon/TycoonCard.cs index 07672c767..c87848d52 100644 --- a/Assets/02.Scripts/Ui/Tycoon/TycoonCard.cs +++ b/Assets/02.Scripts/Ui/Tycoon/TycoonCard.cs @@ -1,50 +1,173 @@ +using System; using System.Collections; +using BlueWater; using BlueWater.Tycoons; +using SingularityGroup.HotReload; +using Sirenix.OdinInspector; using UnityEngine; +using TMPro; +using UnityEngine.EventSystems; +using UnityEngine.UI; +using Object = UnityEngine.Object; // TextMeshPro 네임스페이스 추가 -public class TycoonCard : MonoBehaviour + +public enum Acceleration +{ + + None = default, + EaseExpoIn, + EaseExpoOut, + EaseBounceIn, + EaseBounceOut, + + // EaseBounceOut = None + //아직 정해지지 않은건 None표시 +} + +public class TycoonCard : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IPointerClickHandler { - public float rotationDuration = 1.0f; - public void Start() - { - StartCoroutine(RotateOverTime(180f)); - // var a = TycoonManager.Instance.GetLevelDataByIdx("1"); - // Resources.Load() - } + + + + [field: Title("카드 속성")] + + private CardData _cardData_IDX; + [field: SerializeField, CLabel("IDX"), ReadOnly] + private string _cardData = "AddAllLiquid"; + + [field: SerializeField, CLabel("카드 이름")] + private string CardName; + //[field: SerializeField, CLabel("카드 이미지")] + //private Image CardImage; + [field: SerializeField, CLabel("카드 텍스트")] + private string CardText; + + private Coroutine currentRotationCoroutine; + [field: Title("카드 회전")] + [field: SerializeField, CLabel("카드 회전 속도")] + private float RotationDurationCard = 1.0f; + [field: SerializeField, CLabel("회전 가속 종류")] + public Acceleration AccelerationCard; - - private IEnumerator RotateOverTime(float relativeYRotation) + [Button("회전")] + public void Rotation_Start() { RectTransform rectTransform = this.GetComponent(); + rectTransform.localRotation = Quaternion.Euler(0,-180,0); + + if (currentRotationCoroutine != null) + { + StopCoroutine(currentRotationCoroutine); + currentRotationCoroutine = null; + } + + currentRotationCoroutine = StartCoroutine(RotateOverTime()); + + var a = TycoonManager.Instance.GetCardDataByIdx(_cardData); + + // Resources.Load() + } + + + void Start() + { + _cardData_IDX = TycoonManager.Instance.GetCardDataByIdx(_cardData); + + Transform nameTransform = transform.Find("Name"); + Transform infoTransform = transform.Find("Infomation"); + + TextMeshProUGUI nametextComponent = nameTransform.GetComponent(); + nametextComponent.text = _cardData_IDX.Img; + + TextMeshProUGUI infotextComponent = infoTransform.GetComponent(); + infotextComponent.text = _cardData_IDX.ScriptText; + + } + + // 마우스가 이미지 위에 올라갔을 때 호출 + public void OnPointerEnter(PointerEventData eventData) + { + Debug.Log("OnMouse"); + + + } + + // 마우스가 이미지에서 벗어났을 때 호출 + public void OnPointerExit(PointerEventData eventData) + { + Debug.Log("OffMouse"); + //image.color = originalColor; // 원래 색상으로 복원 + } + + // 마우스 클릭 시 호출 + public void OnPointerClick(PointerEventData eventData) + { + Debug.Log("ClickMouse"); + // image.color = clickColor; // 클릭 시 색상을 변경 + } + + private IEnumerator RotateOverTime() + { + RectTransform rectTransform = this.GetComponent(); Transform backObject = rectTransform.Find("Back"); + backObject.gameObject.SetActive(true); Quaternion startRotation = rectTransform.localRotation; - Quaternion targetRotation = startRotation * Quaternion.Euler(0, relativeYRotation, 0); + Quaternion targetRotation = Quaternion.Euler(0, 0, 0); float elapsedTime = 0f; - while (elapsedTime < rotationDuration) + while (elapsedTime < RotationDurationCard) { elapsedTime += Time.deltaTime; - float t = elapsedTime / rotationDuration; + float t = elapsedTime / RotationDurationCard; + float easedT = t; + + if (AccelerationCard == Acceleration.EaseExpoIn) easedT = Mathf.Pow(2, 10 * (t - 1)) ; + else if (AccelerationCard == Acceleration.EaseExpoOut) easedT = 1 - Mathf.Pow(2, -10 * t); + else if (AccelerationCard == Acceleration.EaseBounceIn) easedT = 1 - BounceOut(1 - t); + else if (AccelerationCard == Acceleration.EaseBounceOut) easedT = BounceOut(t); - float easedT = 1 - Mathf.Pow(2, -10 * t); - rectTransform.localRotation = Quaternion.Lerp(startRotation, targetRotation, easedT); - float currentYRotation = rectTransform.localRotation.eulerAngles.y; - + if (currentYRotation <= 90.0f && backObject.gameObject.activeSelf) { backObject.gameObject.SetActive(false); } - + yield return null; } rectTransform.localRotation = targetRotation; } + + + + //가속도를 위한 함수...▼ + float BounceOut(float t) + { + if (t < (1 / 2.75f)) + { + return 7.5625f * t * t; + } + else if (t < (2 / 2.75f)) + { + t -= (1.5f / 2.75f); + return 7.5625f * t * t + 0.75f; + } + else if (t < (2.5f / 2.75f)) + { + t -= (2.25f / 2.75f); + return 7.5625f * t * t + 0.9375f; + } + else + { + t -= (2.625f / 2.75f); + return 7.5625f * t * t + 0.984375f; + } + } } \ No newline at end of file diff --git a/Assets/02.Scripts/Ui/Tycoon/TycoonSelectCard.cs b/Assets/02.Scripts/Ui/Tycoon/TycoonSelectCard.cs index b7f3e6acf..d86f4f34c 100644 --- a/Assets/02.Scripts/Ui/Tycoon/TycoonSelectCard.cs +++ b/Assets/02.Scripts/Ui/Tycoon/TycoonSelectCard.cs @@ -1,9 +1,68 @@ +using Sirenix.OdinInspector; using UnityEngine; namespace BlueWater.Uis { public class TycoonSelectCard : MonoBehaviour { + + [field: SerializeField, CLabel("카드 1")] + private GameObject Card01; + [field: SerializeField, CLabel("카드 2")] + private GameObject Card02; + [field: SerializeField, CLabel("카드 3")] + private GameObject Card03; + + private GameObject currentCard01; + private GameObject currentCard02; + private GameObject currentCard03; + + private TycoonCard tycoonCard01Componet; + private TycoonCard tycoonCard02Componet; + private TycoonCard tycoonCard03Componet; + + [Button("카드 생성하기(레벨업)")] + private void CreateCard() + { + if (!Application.isPlaying) return; + + // 기존 카드가 있으면 삭제 + if (currentCard01 != null) + { + Destroy(currentCard01); + } + if (currentCard02 != null) + { + Destroy(currentCard02); + } + if (currentCard03 != null) + { + Destroy(currentCard03); + } + + currentCard01 = Instantiate(Card01, this.transform); + currentCard01.name = "Card01"; + + currentCard02 = Instantiate(Card02, this.transform); + currentCard02.name = "Card02"; + + currentCard03 = Instantiate(Card03, this.transform); + currentCard03.name = "Card03"; + + currentCard01.transform.localPosition = new Vector3(-550, 0, 0); + currentCard02.transform.localPosition = new Vector3(0, 0, 0); + currentCard03.transform.localPosition = new Vector3(550, 0, 0); + + tycoonCard01Componet = currentCard01.GetComponent(); + tycoonCard02Componet = currentCard02.GetComponent(); + tycoonCard03Componet = currentCard03.GetComponent(); + + tycoonCard01Componet.Rotation_Start(); + tycoonCard02Componet.Rotation_Start(); + tycoonCard03Componet.Rotation_Start(); + } + + private void Awake() { diff --git a/Assets/05.Prefabs/Uis/Tycoons/Card.prefab b/Assets/05.Prefabs/Uis/Tycoons/Card.prefab index 71e883338..55b817037 100644 --- a/Assets/05.Prefabs/Uis/Tycoons/Card.prefab +++ b/Assets/05.Prefabs/Uis/Tycoons/Card.prefab @@ -1,6 +1,6 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!1 &1599447962287829390 +--- !u!1 &2943782663385093063 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -8,50 +8,50 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 3568068781563084469} - - component: {fileID: 434234875545835550} - - component: {fileID: 176969616951321024} + - component: {fileID: 9199400030788091584} + - component: {fileID: 2171710615668606180} + - component: {fileID: 5832205689271844236} m_Layer: 5 m_Name: Back m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!224 &3568068781563084469 + m_IsActive: 1 +--- !u!224 &9199400030788091584 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1599447962287829390} - m_LocalRotation: {x: -0.08715574, y: -0, z: -0, w: 0.9961947} + m_GameObject: {fileID: 2943782663385093063} + m_LocalRotation: {x: -0.08715578, y: 0, z: 0, w: 0.9961947} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 5, y: 8, z: 5} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 7324957763114792098} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Father: {fileID: 3945043186252027743} + m_LocalEulerAnglesHint: {x: -10, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 100, y: 100} m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &434234875545835550 +--- !u!222 &2171710615668606180 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1599447962287829390} + m_GameObject: {fileID: 2943782663385093063} m_CullTransparentMesh: 1 ---- !u!114 &176969616951321024 +--- !u!114 &5832205689271844236 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1599447962287829390} + m_GameObject: {fileID: 2943782663385093063} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} @@ -75,7 +75,7 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 ---- !u!1 &1694737103793032843 +--- !u!1 &3367794773895032679 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -83,50 +83,50 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 6283945752995230166} - - component: {fileID: 7781542194575899335} - - component: {fileID: 3988029190057267223} + - component: {fileID: 6407304977742262138} + - component: {fileID: 4999947251592817492} + - component: {fileID: 5766635877287661826} m_Layer: 5 - m_Name: Frarme + m_Name: Image m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &6283945752995230166 +--- !u!224 &6407304977742262138 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1694737103793032843} - m_LocalRotation: {x: -0.08715574, y: -0, z: -0, w: 0.9961947} + m_GameObject: {fileID: 3367794773895032679} + m_LocalRotation: {x: -0.08715578, y: 0, z: 0, w: 0.9961947} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 5, y: 8, z: 5} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 7324957763114792098} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Father: {fileID: 3945043186252027743} + m_LocalEulerAnglesHint: {x: -10, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 100, y: 100} m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &7781542194575899335 +--- !u!222 &4999947251592817492 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1694737103793032843} + m_GameObject: {fileID: 3367794773895032679} m_CullTransparentMesh: 1 ---- !u!114 &3988029190057267223 +--- !u!114 &5766635877287661826 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1694737103793032843} + m_GameObject: {fileID: 3367794773895032679} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} @@ -140,7 +140,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 892393093, guid: 3ab5d303d899ad14e83d2bb6dbd45e08, type: 3} + m_Sprite: {fileID: 0} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -150,7 +150,7 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 ---- !u!1 &2862282253357705904 +--- !u!1 &4954372994133229964 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -158,147 +158,9 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 3080855810356241025} - - component: {fileID: 3843437466719900147} - - component: {fileID: 1807220928853352213} - m_Layer: 5 - m_Name: Name - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &3080855810356241025 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2862282253357705904} - m_LocalRotation: {x: -0.08715574, y: -0, z: -0, w: 0.9961947} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 5, y: 8, z: 5} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 7324957763114792098} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 174.11392} - m_SizeDelta: {x: 200, y: 50} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &3843437466719900147 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2862282253357705904} - m_CullTransparentMesh: 1 ---- !u!114 &1807220928853352213 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2862282253357705904} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_text: 'Name - -' - m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: dabfdeb80b25d44b4ace56414d0eb4ad, type: 2} - m_sharedMaterial: {fileID: 5657039867100983486, guid: dabfdeb80b25d44b4ace56414d0eb4ad, type: 2} - m_fontSharedMaterials: [] - m_fontMaterial: {fileID: 0} - m_fontMaterials: [] - m_fontColor32: - serializedVersion: 2 - rgba: 4278190080 - m_fontColor: {r: 0, g: 0, b: 0, a: 1} - m_enableVertexGradient: 0 - m_colorMode: 3 - m_fontColorGradient: - topLeft: {r: 1, g: 1, b: 1, a: 1} - topRight: {r: 1, g: 1, b: 1, a: 1} - bottomLeft: {r: 1, g: 1, b: 1, a: 1} - bottomRight: {r: 1, g: 1, b: 1, a: 1} - m_fontColorGradientPreset: {fileID: 0} - m_spriteAsset: {fileID: 0} - m_tintAllSprites: 0 - m_StyleSheet: {fileID: 0} - m_TextStyleHashCode: -1183493901 - m_overrideHtmlColors: 0 - m_faceColor: - serializedVersion: 2 - rgba: 4294967295 - m_fontSize: 7 - m_fontSizeBase: 7 - m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 - m_fontStyle: 0 - m_HorizontalAlignment: 2 - m_VerticalAlignment: 512 - m_textAlignment: 65535 - m_characterSpacing: 0 - m_wordSpacing: 0 - m_lineSpacing: 0 - m_lineSpacingMax: 0 - m_paragraphSpacing: 0 - m_charWidthMaxAdj: 0 - m_TextWrappingMode: 0 - m_wordWrappingRatios: 0.4 - m_overflowMode: 0 - m_linkedTextComponent: {fileID: 0} - parentLinkedComponent: {fileID: 0} - m_enableKerning: 0 - m_ActiveFontFeatures: 6e72656b - m_enableExtraPadding: 0 - checkPaddingRequired: 0 - m_isRichText: 1 - m_EmojiFallbackSupport: 1 - m_parseCtrlCharacters: 1 - m_isOrthographic: 1 - m_isCullingEnabled: 0 - m_horizontalMapping: 0 - m_verticalMapping: 0 - m_uvLineOffset: 0 - m_geometrySortingOrder: 0 - m_IsTextObjectScaleStatic: 0 - m_VertexBufferAutoSizeReduction: 0 - m_useMaxVisibleDescender: 1 - m_pageToDisplay: 1 - m_margin: {x: 54.757496, y: 1.0851669, z: 54.898407, w: 41.594578} - m_isUsingLegacyAnimationComponent: 0 - m_isVolumetricText: 0 - m_hasFontAssetChanged: 0 - m_baseMaterial: {fileID: 0} - m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!1 &4359887570087183664 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 5045943798630788057} - - component: {fileID: 5673011630952190823} - - component: {fileID: 990572053237628293} + - component: {fileID: 761962999104109761} + - component: {fileID: 5379141909738381352} + - component: {fileID: 3752849641387581418} m_Layer: 5 m_Name: Infomation m_TagString: Untagged @@ -306,40 +168,40 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &5045943798630788057 +--- !u!224 &761962999104109761 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4359887570087183664} - m_LocalRotation: {x: -0.08715574, y: -0, z: -0, w: 0.9961947} + m_GameObject: {fileID: 4954372994133229964} + m_LocalRotation: {x: -0.08715578, y: 0, z: 0, w: 0.9961947} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 5, y: 8, z: 5} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 7324957763114792098} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Father: {fileID: 3945043186252027743} + m_LocalEulerAnglesHint: {x: -10, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: 0, y: -409.6772} m_SizeDelta: {x: 200, y: 50} m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &5673011630952190823 +--- !u!222 &5379141909738381352 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4359887570087183664} + m_GameObject: {fileID: 4954372994133229964} m_CullTransparentMesh: 1 ---- !u!114 &990572053237628293 +--- !u!114 &3752849641387581418 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4359887570087183664} + m_GameObject: {fileID: 4954372994133229964} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} @@ -424,7 +286,7 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!1 &6576647302154881358 +--- !u!1 &6408727219447932146 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -432,50 +294,50 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 3124809062491607845} - - component: {fileID: 3174161579352927381} - - component: {fileID: 5942161854860758825} + - component: {fileID: 7519490804232866819} + - component: {fileID: 4380907822811519659} + - component: {fileID: 1209019601882638115} m_Layer: 5 - m_Name: Image + m_Name: Frarme m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &3124809062491607845 +--- !u!224 &7519490804232866819 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6576647302154881358} - m_LocalRotation: {x: -0.08715574, y: -0, z: -0, w: 0.9961947} + m_GameObject: {fileID: 6408727219447932146} + m_LocalRotation: {x: -0.08715578, y: 0, z: 0, w: 0.9961947} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 5, y: 8, z: 5} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 7324957763114792098} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Father: {fileID: 3945043186252027743} + m_LocalEulerAnglesHint: {x: -10, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 100, y: 100} m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &3174161579352927381 +--- !u!222 &4380907822811519659 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6576647302154881358} + m_GameObject: {fileID: 6408727219447932146} m_CullTransparentMesh: 1 ---- !u!114 &5942161854860758825 +--- !u!114 &1209019601882638115 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6576647302154881358} + m_GameObject: {fileID: 6408727219447932146} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} @@ -489,7 +351,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 0} + m_Sprite: {fileID: 892393093, guid: 3ab5d303d899ad14e83d2bb6dbd45e08, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -499,7 +361,7 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 ---- !u!1 &8510161667227778467 +--- !u!1 &7279465393450390489 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -507,8 +369,8 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 7324957763114792098} - - component: {fileID: 2222690022248668753} + - component: {fileID: 3945043186252027743} + - component: {fileID: 519938834043385977} m_Layer: 5 m_Name: Card m_TagString: Untagged @@ -516,40 +378,180 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &7324957763114792098 +--- !u!224 &3945043186252027743 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8510161667227778467} - m_LocalRotation: {x: 0, y: 1, z: 0, w: 0} + m_GameObject: {fileID: 7279465393450390489} + m_LocalRotation: {x: 0, y: -1, z: 0, w: -0.00000004371139} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 0} m_ConstrainProportionsScale: 0 m_Children: - - {fileID: 3124809062491607845} - - {fileID: 6283945752995230166} - - {fileID: 5045943798630788057} - - {fileID: 3080855810356241025} - - {fileID: 3568068781563084469} + - {fileID: 6407304977742262138} + - {fileID: 7519490804232866819} + - {fileID: 761962999104109761} + - {fileID: 4289739070687939296} + - {fileID: 9199400030788091584} m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: -180, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchoredPosition: {x: 550, y: 0} m_SizeDelta: {x: 1, y: 1} m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &2222690022248668753 +--- !u!114 &519938834043385977 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8510161667227778467} + m_GameObject: {fileID: 7279465393450390489} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 1e080f1606bf24d4cb31f55f7958812a, type: 3} m_Name: m_EditorClassIdentifier: - rotationDuration: 3 + _cardData: AddAllLiquid + CardName: + CardText: + RotationDurationCard: 3 + AccelerationCard: 2 +--- !u!1 &8388805008705484080 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4289739070687939296} + - component: {fileID: 4833202526536421552} + - component: {fileID: 6015961266973885280} + m_Layer: 5 + m_Name: Name + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4289739070687939296 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8388805008705484080} + m_LocalRotation: {x: -0.08715578, y: 0, z: 0, w: 0.9961947} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 5, y: 8, z: 5} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3945043186252027743} + m_LocalEulerAnglesHint: {x: -10, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 174.11392} + m_SizeDelta: {x: 200, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &4833202526536421552 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8388805008705484080} + m_CullTransparentMesh: 1 +--- !u!114 &6015961266973885280 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8388805008705484080} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: "Name\n\t" + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: dabfdeb80b25d44b4ace56414d0eb4ad, type: 2} + m_sharedMaterial: {fileID: 5657039867100983486, guid: dabfdeb80b25d44b4ace56414d0eb4ad, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4278190080 + m_fontColor: {r: 0, g: 0, b: 0, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 7 + m_fontSizeBase: 7 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 0 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 54.757496, y: 1.0851669, z: 54.898407, w: 41.594578} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} diff --git a/Assets/Resources/Excel/CardDataTable.xlsx b/Assets/Resources/Excel/CardDataTable.xlsx new file mode 100644 index 000000000..23bf56018 Binary files /dev/null and b/Assets/Resources/Excel/CardDataTable.xlsx differ diff --git a/Assets/Resources/Excel/CardDataTable.xlsx.meta b/Assets/Resources/Excel/CardDataTable.xlsx.meta new file mode 100644 index 000000000..0bb628729 --- /dev/null +++ b/Assets/Resources/Excel/CardDataTable.xlsx.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: fd6013fb3e24e0a4397b2846f488c4bb +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/JSON/CardDataTable.json b/Assets/Resources/JSON/CardDataTable.json new file mode 100644 index 000000000..fa17eed8b --- /dev/null +++ b/Assets/Resources/JSON/CardDataTable.json @@ -0,0 +1,128 @@ +[ + { + "Idx": "HeartPlus", + "Img": "HeartPlusImg", + "ScriptText": "하트 하나 추가", + "Max": 10, + "Ratio": 5 + }, + { + "Idx": "HeartHeal", + "Img": "HeartHealImg", + "ScriptText": "하트 하나 회복", + "Max": 10, + "Ratio": 10 + }, + { + "Idx": "HeartAllHeal", + "Img": "HeartAllHealImg", + "ScriptText": "하트 전체 회복", + "Max": 0, + "Ratio": 5 + }, + { + "Idx": "AddLiquidB", + "Img": "LiquidBImg", + "ScriptText": "B 술을 4000ml 추가", + "Max": 0, + "Ratio": 5 + }, + { + "Idx": "AddLiquidC", + "Img": "LiquidCImg", + "ScriptText": "C 술을 4000ml 추가", + "Max": 0, + "Ratio": 5 + }, + { + "Idx": "AddLiquidD", + "Img": "LiquidDImg", + "ScriptText": "D 술을 4000ml 추가", + "Max": 0, + "Ratio": 5 + }, + { + "Idx": "AddLiquidE", + "Img": "LiquidEImg", + "ScriptText": "E 술을 4000ml 추가", + "Max": 0, + "Ratio": 5 + }, + { + "Idx": "AddGarnish1", + "Img": "Garnish1Img", + "ScriptText": "1번 가니쉬를 4000ml 추가", + "Max": 0, + "Ratio": 5 + }, + { + "Idx": "AddGarnish2", + "Img": "Garnish2Img", + "ScriptText": "2번 가니쉬를 4000ml 추가", + "Max": 0, + "Ratio": 5 + }, + { + "Idx": "AddAllLiquid", + "Img": "LiquidAllHealImg", + "ScriptText": "전체 재료 1000ml 추가", + "Max": 0, + "Ratio": 10 + }, + { + "Idx": "ServerNpc", + "Img": "ServerNpcImg", + "ScriptText": "서빙 종업원 추가", + "Max": 5, + "Ratio": 5 + }, + { + "Idx": "CleanerNpc", + "Img": "CleanerNpcImg", + "ScriptText": "청소 종업원 추가", + "Max": 5, + "Ratio": 5 + }, + { + "Idx": "ChefNpc", + "Img": "ChefNpcImg", + "ScriptText": "바텐터 종업원 추가", + "Max": 5, + "Ratio": 5 + }, + { + "Idx": "SpeedUp", + "Img": "SpeedUpImg", + "ScriptText": "플레이어 이동 속도 5% 증가", + "Max": 10, + "Ratio": 5 + }, + { + "Idx": "ExpGetUp", + "Img": "ExpGetUpImg", + "ScriptText": "경험치 획득 5% 증가", + "Max": 10, + "Ratio": 5 + }, + { + "Idx": "GoldGetUp", + "Img": "GoldGetUpImg", + "ScriptText": "골드 획득 5% 증가", + "Max": 10, + "Ratio": 5 + }, + { + "Idx": "CleanUp", + "Img": "CleanUpImgImg", + "ScriptText": "레스토랑 한번에 청소", + "Max": 0, + "Ratio": 5 + }, + { + "Idx": "GuageReset", + "Img": "GuageResetImg", + "ScriptText": "모든 손님들의 기다림 초기화", + "Max": 0, + "Ratio": 5 + } +] \ No newline at end of file diff --git a/Assets/Resources/JSON/CardDataTable.json.meta b/Assets/Resources/JSON/CardDataTable.json.meta new file mode 100644 index 000000000..28e38058f --- /dev/null +++ b/Assets/Resources/JSON/CardDataTable.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6cee7a2c0292e1442ab8061223758ae4 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: