diff --git a/Assets/DogKnight/Animator/DogControl.controller b/Assets/DogKnight/Animator/DogControl.controller
index e870e29..7877743 100644
--- a/Assets/DogKnight/Animator/DogControl.controller
+++ b/Assets/DogKnight/Animator/DogControl.controller
@@ -20,7 +20,7 @@ AnimatorStateTransition:
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.75
- m_HasExitTime: 0
+ m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
@@ -42,7 +42,7 @@ AnimatorStateTransition:
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.70000005
- m_HasExitTime: 0
+ m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
@@ -64,7 +64,7 @@ AnimatorStateTransition:
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.70000005
- m_HasExitTime: 0
+ m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
@@ -89,7 +89,7 @@ AnimatorStateTransition:
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.75
- m_HasExitTime: 0
+ m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
@@ -108,25 +108,25 @@ AnimatorController:
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
- m_Controller: {fileID: 0}
+ m_Controller: {fileID: 9100000}
- m_Name: IsSpecialAttack
m_Type: 9
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
- m_Controller: {fileID: 0}
+ m_Controller: {fileID: 9100000}
- m_Name: GetHit
m_Type: 9
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
- m_Controller: {fileID: 0}
+ m_Controller: {fileID: 9100000}
- m_Name: IsDead
m_Type: 9
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
- m_Controller: {fileID: 0}
+ m_Controller: {fileID: 9100000}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
@@ -160,7 +160,7 @@ AnimatorStateTransition:
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.75
- m_HasExitTime: 0
+ m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
@@ -353,7 +353,7 @@ AnimatorStateTransition:
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.70000005
- m_HasExitTime: 0
+ m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
@@ -378,7 +378,7 @@ AnimatorStateTransition:
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.75
- m_HasExitTime: 0
+ m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
diff --git a/Assets/Scenes/3.28_DogKnight.unity b/Assets/Scenes/3.28_DogKnight.unity
index 67eba50..a2e1e7c 100644
--- a/Assets/Scenes/3.28_DogKnight.unity
+++ b/Assets/Scenes/3.28_DogKnight.unity
@@ -135,7 +135,6 @@ GameObject:
- component: {fileID: 16706862}
- component: {fileID: 16706861}
- component: {fileID: 16706860}
- - component: {fileID: 16706863}
m_Layer: 5
m_Name: AttackButton
m_TagString: Untagged
@@ -207,18 +206,6 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls:
- - m_Target: {fileID: 16706863}
- m_TargetAssemblyTypeName: AttackButton, Assembly-CSharp
- m_MethodName: Active
- m_Mode: 1
- m_Arguments:
- m_ObjectArgument: {fileID: 0}
- m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
- m_IntArgument: 0
- m_FloatArgument: 0
- m_StringArgument:
- m_BoolArgument: 0
- m_CallState: 2
- m_Target: {fileID: 128527308}
m_TargetAssemblyTypeName: GameManager, Assembly-CSharp
m_MethodName: RoundNotify
@@ -293,18 +280,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 16706858}
m_CullTransparentMesh: 1
---- !u!114 &16706863
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 16706858}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 4c7d2fde507a7124d8ebacb6fa73e4e4, type: 3}
- m_Name:
- m_EditorClassIdentifier:
--- !u!1 &37514129
GameObject:
m_ObjectHideFlags: 0
diff --git a/Assets/Scripts/3.28.meta b/Assets/Scripts/3.28.meta
new file mode 100644
index 0000000..53caabe
--- /dev/null
+++ b/Assets/Scripts/3.28.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 9cc86cd227c0926419876f1e0a0364e1
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Character.cs b/Assets/Scripts/3.28/Character.cs
similarity index 53%
rename from Assets/Scripts/Character.cs
rename to Assets/Scripts/3.28/Character.cs
index 0b30941..e1b046c 100644
--- a/Assets/Scripts/Character.cs
+++ b/Assets/Scripts/3.28/Character.cs
@@ -12,60 +12,46 @@ public class Character : MonoBehaviour, Observer
{
public string _myName;
public float _myHp;
+ // 1. Hp UI bar ������ ���� HpMax �� �߰�
+ public float _myHpMax;
public float _myDamage;
protected int _gameRound;
protected string _whoseTurn;
protected bool _isFinished;
- // 1. TurnUpdate: _gameRound, _whoseTurn update
public void TurnUpdate(int round, string turn)
{
-
+ this._gameRound = round;
+ this._whoseTurn = turn;
}
- // 2. FinishUpdate: _isFinished update
public void FinishUpdate(bool isFinish)
{
-
+ this._isFinished = isFinish;
}
- ///
- /// 3. Attack: ���ݽ� ����� ���� �� Player�� Enemy �������� ����� ��� �ۼ�
- /// ���� �� class���� �������̵��ؼ� �ۼ�
- /// 1) ������ ������ �ʾҰ� �ڽ��� _myName�� _whoseTurn�� ��ġ�Ѵٸ�,
- /// 2) AttackMotion() ȣ���ؼ� �ִϸ��̼� ����
- /// 3) ������ GetHit()�� �ڽ��� _myDamage �Ѱܼ� ȣ��
- ///
+
public virtual void Attack()
{
}
- ///
- /// 4. GetHit: �ǰݽ� ����� ���� 3���� �����ϰ� ����Ǵ� ��� �ۼ�
- /// ���� �� class���� �������̵��ؼ� �ۼ�
- /// 1) �Ѱ� ���� damage��ŭ _myHp ����
- /// 2) ���� _myHp�� 0���� �۰ų� ���ٸ�, DeadMotion() ȣ���ؼ� �ִϸ��̼� ����
- /// + Subject�� EndNotify() ȣ��
- /// 3) ���� ����ִٸ�, GetHitMotion() ȣ���ؼ� �ִϸ��̼� ����
- /// + Debug.Log($"{_myName} HP: {_myHp}"); �߰�
- ///
public virtual void GetHit(float damage)
{
-
+ _myHp -= damage;
+ if(_myHp <= 0)
+ {
+ DeadMotion();
+ GameManager.Instance().EndNotify();
+ }
+ else
+ {
+ GetHitMotion();
+ Debug.Log($"{_myName} HP: {_myHp}");
+ }
}
- ///
- /// �� �����δ� animation ���� code, ������ �ʿ� ���� (������ ���ǿ��� �� ��)
- /// ������ �Ʒ�ó�� ���� �ҵ带 ���� �ʿ䵵 ������ ����� ���� �����̱� ������
- /// ����� ���Ǹ� ���� 4���� �ҵ带 �ۼ��Ͽ���.
- /// ���� Attack, GetHit �������̵���, �Ʒ��� �ҵ常 ȣ���ϸ� animation �����
- /// 1. AttackMotion()
- /// 2. SpecialAttackMotion()
- /// 3. DeadMotion()
- /// 4. GetHitMotion()
- ///
protected Animator _animator;
protected virtual void Init()
diff --git a/Assets/Scripts/Character.cs.meta b/Assets/Scripts/3.28/Character.cs.meta
similarity index 100%
rename from Assets/Scripts/Character.cs.meta
rename to Assets/Scripts/3.28/Character.cs.meta
diff --git a/Assets/Scripts/3.28/Enemy.cs b/Assets/Scripts/3.28/Enemy.cs
new file mode 100644
index 0000000..e971c93
--- /dev/null
+++ b/Assets/Scripts/3.28/Enemy.cs
@@ -0,0 +1,65 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class Enemy : Character
+{
+ // 1. _player ���� ���� -> GetCharacter�� ������ ����
+ //private Player _player;
+ private float _randomHeal;
+
+ protected override void Init()
+ {
+ base.Init();
+ _myName = "Enemy";
+ _myHpMax = 100;
+ _myHp = _myHpMax;
+ _myDamage = 15;
+ GameManager.Instance().AddCharacter(this.GetComponent());
+ }
+
+ private void Awake()
+ {
+ Init();
+ }
+
+ public override void Attack()
+ {
+ if(_myName.Equals(_whoseTurn) && !_isFinished)
+ {
+ _myDamage += 3;
+ // 1. GetCharacter�� Player ����
+ if (_gameRound >= 10) _myDamage = GameManager.Instance().GetCharacter("Player")._myHp;
+ AttackMotion();
+ GameManager.Instance().GetCharacter("Player").GetHit(_myDamage);
+ }
+ }
+
+ public override void GetHit(float damage)
+ {
+ base.GetHit(damage);
+ if(_myHp > 0)
+ {
+ _randomHeal = Random.Range(0, 10);
+ if(_randomHeal < 5) // 50% Ȯ���� Heal
+ {
+ StartCoroutine(HealCoroutine());
+ }
+ }
+ }
+
+ ///
+ /// HealCoroutine:
+ /// 1) Player�� Enemy ���� -> Hp ���� -> UI �ݿ�
+ /// 2) Enemy Ȯ�������� ȸ�� -> Hp �� -> UI �ݿ�
+ /// 3) �߰��� yield return ���� ������ �ѹ��� ó���ż� �ǰ� �ϰ� Heal �ϴ� UI �ݿ��� ����� �̷������ ����.
+ ///
+ ///
+ IEnumerator HealCoroutine()
+ {
+ yield return new WaitForSeconds(1.3f);
+ _myHp += 10;
+ Debug.Log($"{_myName} Heal!");
+ }
+}
+
diff --git a/Assets/Scripts/Enemy.cs.meta b/Assets/Scripts/3.28/Enemy.cs.meta
similarity index 100%
rename from Assets/Scripts/Enemy.cs.meta
rename to Assets/Scripts/3.28/Enemy.cs.meta
diff --git a/Assets/Scripts/3.28/GameManager.cs b/Assets/Scripts/3.28/GameManager.cs
new file mode 100644
index 0000000..dfc1805
--- /dev/null
+++ b/Assets/Scripts/3.28/GameManager.cs
@@ -0,0 +1,97 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class GameManager : MonoBehaviour, Subject
+{
+ private static GameManager _instance;
+ public static GameManager Instance()
+ {
+ return _instance;
+ }
+
+ private void Awake()
+ {
+ if (_instance == null)
+ {
+ _instance = this;
+ DontDestroyOnLoad(this.gameObject);
+ }
+ else
+ {
+ if (this != _instance)
+ {
+ Destroy(this.gameObject);
+ }
+ }
+ }
+
+ private int _gameRound = 0;
+ private string _whoseTurn = "Enemy";
+ private bool _isEnd = false;
+
+ // 1. SceneUI�� GameManager ���� �� �� �ֵ��� ij���� ��ųʸ� ����
+ private Dictionary _characterList = new Dictionary();
+
+ private delegate void TurnHandler(int round, string turn);
+ private TurnHandler _turnHandler;
+ private delegate void FinishHandler(bool isFinish);
+ private FinishHandler _finishHandler;
+ // 2. UIHandler ���� (�̹����� round, turn, isFinish ��� �´�)
+ private delegate void UIHandler(int round, string turn, bool isFinish);
+ private UIHandler _uiHandler;
+
+ public void RoundNotify()
+ {
+ if (!_isEnd)
+ {
+ if(_whoseTurn == "Enemy")
+ {
+ _gameRound++;
+ Debug.Log($"GameManager: Round {_gameRound}.");
+ }
+ TurnNotify();
+ }
+ }
+
+ public void TurnNotify()
+ {
+ _whoseTurn = _whoseTurn == "Enemy" ? "Player" : "Enemy";
+ Debug.Log($"GameManager: {_whoseTurn} turn.");
+ _turnHandler(_gameRound, _whoseTurn);
+ // 2. _uiHandler ȣ��
+ }
+
+ public void EndNotify()
+ {
+ _isEnd = true;
+ _finishHandler(_isEnd);
+ // 2. _uiHandler ȣ��
+ Debug.Log("GameManager: The End");
+ Debug.Log($"GameManager: {_whoseTurn} is Win!");
+ }
+
+ public void AddCharacter(Character character)
+ {
+ _turnHandler += new TurnHandler(character.TurnUpdate);
+ _finishHandler += new FinishHandler(character.FinishUpdate);
+ // 1. _characterList�� �߰�
+ }
+
+ // 3. AddUI: SceneUI �������� ���
+ public void AddUI(SceneUI ui)
+ {
+
+ }
+
+ ///
+ /// 4. GetChracter: �Ѱ� ���� name�� Character�� �ִٸ� �ش� ij���� ��ȯ
+ /// 1) _characterList ��ȸ�ϸ�
+ /// 2) if ���� ContainsKey(name) �̿�
+ /// 3) ���ٸ� null ��ȯ
+ ///
+ public Character GetCharacter(string name)
+ {
+ return null;
+ }
+}
diff --git a/Assets/Scripts/GameManager.cs.meta b/Assets/Scripts/3.28/GameManager.cs.meta
similarity index 100%
rename from Assets/Scripts/GameManager.cs.meta
rename to Assets/Scripts/3.28/GameManager.cs.meta
diff --git a/Assets/Scripts/ObserverSubject.cs b/Assets/Scripts/3.28/ObserverSubject.cs
similarity index 100%
rename from Assets/Scripts/ObserverSubject.cs
rename to Assets/Scripts/3.28/ObserverSubject.cs
diff --git a/Assets/Scripts/ObserverSubject.cs.meta b/Assets/Scripts/3.28/ObserverSubject.cs.meta
similarity index 100%
rename from Assets/Scripts/ObserverSubject.cs.meta
rename to Assets/Scripts/3.28/ObserverSubject.cs.meta
diff --git a/Assets/Scripts/3.28/Player.cs b/Assets/Scripts/3.28/Player.cs
new file mode 100644
index 0000000..082e1a8
--- /dev/null
+++ b/Assets/Scripts/3.28/Player.cs
@@ -0,0 +1,50 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class Player : Character
+{
+ // 1. _enemy ���� ���� -> GetCharacter�� ������ ����
+ //private Enemy _enemy;
+ private float _randomAttack;
+
+ protected override void Init()
+ {
+ base.Init();
+ _myName = "Player";
+ _myHpMax = 100;
+ _myHp = _myHpMax;
+ _myDamage = 20;
+ GameManager.Instance().AddCharacter(this.GetComponent());
+ }
+
+ private void Awake()
+ {
+ Init();
+ }
+
+ public override void Attack()
+ {
+ if(_myName.Equals(_whoseTurn) && !_isFinished)
+ {
+ _randomAttack = Random.Range(0, 10);
+ if (_randomAttack < 7)
+ {
+ AttackMotion();
+ // 1. GetCharacter�� Enemy ����
+ GameManager.Instance().GetCharacter("Enemy").GetHit(_myDamage);
+ }
+ else
+ {
+ SpecialAttackMotion();
+ Debug.Log($"{_myName} Special Attack!");
+ GameManager.Instance().GetCharacter("Enemy").GetHit(_myDamage + 10);
+ }
+ }
+ }
+
+ public override void GetHit(float damage)
+ {
+ base.GetHit(damage);
+ }
+}
diff --git a/Assets/Scripts/Player.cs.meta b/Assets/Scripts/3.28/Player.cs.meta
similarity index 100%
rename from Assets/Scripts/Player.cs.meta
rename to Assets/Scripts/3.28/Player.cs.meta
diff --git a/Assets/Scripts/3.31.meta b/Assets/Scripts/3.31.meta
new file mode 100644
index 0000000..ddc80eb
--- /dev/null
+++ b/Assets/Scripts/3.31.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 2c04404d78a2f3f4fbe34b4195423a3c
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/3.31/Inventory.cs b/Assets/Scripts/3.31/Inventory.cs
new file mode 100644
index 0000000..00cdfbb
--- /dev/null
+++ b/Assets/Scripts/3.31/Inventory.cs
@@ -0,0 +1,31 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using UnityEngine;
+using UnityEngine.EventSystems;
+using UnityEngine.UI;
+using XReal.XTown.UI;
+
+public class Inventory : UIPopup
+{
+ // 1. enum �����Ӱ� ����
+
+ private void Start()
+ {
+ Init();
+ }
+
+ // 2. Popup UI �ݴ� ��ư�� OnClick_Close ���ε�
+ // 3. ItemList�� ItemPropertyType �����ؼ� ������ ������� ItemGroup subitem ����� �� ��
+ // 4. ������ ��, ItemGroup�� SetInfo�� ItemPropertyType �Ҵ��ؼ� ���� �Ѱ��� ��
+ public override void Init()
+ {
+ base.Init();
+ }
+
+ // 5. OnClick_Close: Popup �ݱ�
+ public void OnClick_Close(PointerEventData data)
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/AttackButton.cs.meta b/Assets/Scripts/3.31/Inventory.cs.meta
similarity index 83%
rename from Assets/Scripts/AttackButton.cs.meta
rename to Assets/Scripts/3.31/Inventory.cs.meta
index ddb7d5c..89889dc 100644
--- a/Assets/Scripts/AttackButton.cs.meta
+++ b/Assets/Scripts/3.31/Inventory.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 4c7d2fde507a7124d8ebacb6fa73e4e4
+guid: 3fdd094a19ebd4742a516a19c37abbf8
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Assets/Scripts/3.31/Item.cs b/Assets/Scripts/3.31/Item.cs
new file mode 100644
index 0000000..3149fcd
--- /dev/null
+++ b/Assets/Scripts/3.31/Item.cs
@@ -0,0 +1,54 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.EventSystems;
+using UnityEngine.UI;
+using XReal.XTown.UI;
+
+public class Item : UIBase
+{
+ // 1. enum �����Ӱ� ����
+
+ private string _itemName;
+
+ private void Start()
+ {
+ Init();
+ }
+
+ // 2. Item Button�� OnClick_ItemUse Bind
+ public override void Init()
+ {
+
+ }
+
+ ///
+ /// 3. OnClick_ItemUse
+ /// 1) ItemProperty.GetItemProperty�� _itemName �̿��ؼ� ItemProperty ����
+ /// 2) ���� �ش� ������ ������ 0���� ũ�ٸ�
+ /// 3) ���� -1 & ��ü �ı�
+ /// 4) ItemAction();
+ ///
+ public void OnClick_ItemUse(PointerEventData data)
+ {
+
+ }
+
+ ///
+ /// 4. ItemAction:
+ /// 1) switch ������ itemProperty.PropertyType �μ��� �ް�
+ /// 2) ItemProperty.GetItemProperty�� _itemName �̿��ؼ� ItemProperty �����ؼ�
+ /// 3) Damage���, GameManager.Instance().GetCharacter("Player")�� �÷��̾� �����ؼ� ������ �߰�
+ /// 4) Heal�̶�� �����ϰ� �����ؼ� ü�� �߰� + SceneUI�� CharacterHP() ȣ��
+ ///
+ public void ItemAction()
+ {
+
+ }
+
+ // 5. SetInfo: itemName�� _itemName�� �Ҵ�
+ public void SetInfo(string itemName)
+ {
+
+ }
+}
diff --git a/Assets/Scripts/3.31/Item.cs.meta b/Assets/Scripts/3.31/Item.cs.meta
new file mode 100644
index 0000000..e82ba1a
--- /dev/null
+++ b/Assets/Scripts/3.31/Item.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4cb7f365b84463a40aca10ed879fe58c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/3.31/ItemGroup.cs b/Assets/Scripts/3.31/ItemGroup.cs
new file mode 100644
index 0000000..2d00dbd
--- /dev/null
+++ b/Assets/Scripts/3.31/ItemGroup.cs
@@ -0,0 +1,33 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.EventSystems;
+using UnityEngine.UI;
+using XReal.XTown.UI;
+using System;
+
+public class ItemGroup : UIBase
+{
+ // 1. enum �����Ӱ� ����
+
+ private string _itemGroupName;
+
+ private void Start()
+ {
+ Init();
+ }
+
+ // 2. �ؽ�Ʈ UI�� _itemGroupName���� update
+ // 3. ���� �Ҵ�� Ÿ�Կ� �ش��ϴ� �����۵���(Item) subtiem���� ������ ��
+ // 4. ������ ��, Item�� SetInfo�� _itemName �Ҵ��ؼ� ���� �Ѱ��� ��
+ public override void Init()
+ {
+
+ }
+
+ // 5. SetInfo: itemtype�� _itemGroupName�� �Ҵ�
+ public void SetInfo(string itemtype)
+ {
+
+ }
+}
diff --git a/Assets/Scripts/3.31/ItemGroup.cs.meta b/Assets/Scripts/3.31/ItemGroup.cs.meta
new file mode 100644
index 0000000..11ae01c
--- /dev/null
+++ b/Assets/Scripts/3.31/ItemGroup.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2bef0ffe863fed441add0afe340c4b4b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/3.31/ItemList.cs b/Assets/Scripts/3.31/ItemList.cs
new file mode 100644
index 0000000..9ced403
--- /dev/null
+++ b/Assets/Scripts/3.31/ItemList.cs
@@ -0,0 +1,48 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public enum ItemPropertyType
+{
+ Damage, Heal
+}
+
+public class ItemProperty
+{
+ public static ItemProperty DamageItem_Flame = new ItemProperty(ItemPropertyType.Damage, "FlameItem", 4, 5f);
+ public static ItemProperty DamageItem_FireSpear = new ItemProperty(ItemPropertyType.Damage, "FireSpearItem", 3, 10f);
+ public static ItemProperty HealItem_HealStone = new ItemProperty(ItemPropertyType.Heal, "HealStoneItem", 4, 20f);
+
+
+ public static ItemProperty[] ItemProperties = new ItemProperty[]
+ {
+ DamageItem_Flame, DamageItem_FireSpear,
+ HealItem_HealStone
+ };
+
+ // �̸����� ItemProperties �ȿ� �ش� �̸��� ItemProperty�� �ִ��� ������ ������ �ν��Ͻ� ��ȯ
+ public static ItemProperty GetItemProperty(string name)
+ {
+ foreach (ItemProperty item in ItemProperties)
+ {
+ if (item.ItemName.Equals(name))
+ {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ private ItemProperty(ItemPropertyType type, string name, int num, float action)
+ {
+ this.PropertyType = type.ToString();
+ this.ItemName = name;
+ this.ItemNumber = num;
+ this.ItemAction = action;
+ }
+
+ public string PropertyType; // ������ ����
+ public string ItemName; // ������ �̸�
+ public int ItemNumber; // ������ ����
+ public float ItemAction; // ������ Ŭ���� Ȱ���� ����
+}
diff --git a/Assets/Scripts/3.31/ItemList.cs.meta b/Assets/Scripts/3.31/ItemList.cs.meta
new file mode 100644
index 0000000..767705d
--- /dev/null
+++ b/Assets/Scripts/3.31/ItemList.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9bb8f54f389002243b307f49a4180316
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/3.31/SceneUI.cs b/Assets/Scripts/3.31/SceneUI.cs
new file mode 100644
index 0000000..6a70d82
--- /dev/null
+++ b/Assets/Scripts/3.31/SceneUI.cs
@@ -0,0 +1,105 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.EventSystems;
+using UnityEngine.UI;
+using XReal.XTown.UI;
+
+public class SceneUI : UIScene
+{
+ // 1. enum �����Ӱ� ����
+
+ // ������Ʈ���� �Ѱܹ��� ������
+ private bool _isEnd;
+ private int _gameRound;
+ private string _whoseTurn;
+ private Character _player;
+ private Character _enemy;
+
+ // Attack ��ư ���� Ŭ�� ���� bool ����
+ private bool _isClicked = false;
+
+
+ private void Start()
+ {
+ Init();
+ _player = GameManager.Instance().GetCharacter("Player");
+ _enemy = GameManager.Instance().GetCharacter("Enemy");
+ // 1. ������ ���: AddUI(this);
+ // 1. Game Ending ���� �� �ߴ� UI ��Ȱ��ȭ
+ }
+
+ ///
+ /// 2. Init: �� ��ҿ� �Լ� ���ε�
+ /// 1) Attack Button�� OnClick_AttackButton Bind
+ /// 2) �κ��丮 â ���� ��ư�� OnClick_InventoryButton Bind
+ ///
+ public override void Init()
+ {
+ base.Init();
+ }
+
+ ///
+ /// 3. OnClick_AttackButton
+ /// 1) �ִϸ��̼� ���� ���� �ƴ϶��(!_isClicked)
+ /// 2) ������Ʈ���� RoundNotify�� �������鿡�� �̺�Ʈ ����
+ /// 3) GameRoundText();
+ /// 4) �÷��̾� ���� (_player.Attack)
+ /// 5) �� ���� (_enemy.Attack)
+ /// 6) StartCoroutine(GetDamageCoroutine());
+ ///
+ public void OnClick_AttackButton(PointerEventData data)
+ {
+
+ }
+
+ ///
+ /// 4. OnClick_InventoryButton:
+ /// 1) Player ���̶��
+ /// 2) Inventory UIPopup ���� (ShowPopupUI)
+ ///
+ public void OnClick_InventoryButton(PointerEventData data)
+ {
+
+ }
+
+ // 5. GameRoundText: GameRound ���� UI�� text ������Ʈ
+ public void GameRoundText()
+ {
+
+ }
+
+ // 6. CharacterHp: CharacterHp UI ������Ʈ -> fillAmount �� �̿�
+ public void CharacterHp()
+ {
+
+ }
+
+ ///
+ /// 7. GameEnd:
+ /// 1) ������ �����ٸ�,
+ /// 2) GameEnd UI Ȱ��ȭ
+ /// 3) �̱� ij���� �̸� Text ������Ʈ
+ ///
+ public void GameEnd()
+ {
+
+ }
+
+ // 7. GetDamageCoroutine: �� ij���͵��� ����/�ǰ� �ִϸ��̼ǿ� ���߾� UI ǥ���� �ڿ������� �� �ֵ���
+ IEnumerator GetDamageCoroutine()
+ {
+ yield return new WaitForSeconds(1.2f);
+ CharacterHp();
+ yield return new WaitForSeconds(1.2f);
+ GameEnd();
+ CharacterHp();
+ // 7. �ٽ� ��ư ���� �� �ֵ��� _isClicked ����
+ }
+
+ // 8. UIUpdate: ������Ʈ ��������Ʈ�� ��ϵ� ������ ������Ʈ �Լ� -> ���� ������Ʈ
+ public void UIUpdate(int round, string turn, bool isFinish)
+ {
+
+ }
+}
diff --git a/Assets/Scripts/3.31/SceneUI.cs.meta b/Assets/Scripts/3.31/SceneUI.cs.meta
new file mode 100644
index 0000000..26fb4bf
--- /dev/null
+++ b/Assets/Scripts/3.31/SceneUI.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5d02cbf3f535ecb4ca4d59e8da91d0a1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/AttackButton.cs b/Assets/Scripts/AttackButton.cs
deleted file mode 100644
index 102e451..0000000
--- a/Assets/Scripts/AttackButton.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.UI;
-
-public class AttackButton : MonoBehaviour
-{
- ///
- /// ���� �� �ǰ� �ִϸ��̼� ���� �� �� ������ AttackButton ��Ȱ��ȭ �ϴ� �ڵ�
- /// ������ �ʿ� ���� + �ǵ帮�� �� ��
- ///
- public void Active()
- {
- StartCoroutine(ButtonDisableCoroutine());
- }
-
- IEnumerator ButtonDisableCoroutine()
- {
- Button attackButton = this.GetComponent