From 3e6ab55f6ea88fde1f8a1c188228a735ae59fd0f Mon Sep 17 00:00:00 2001 From: "aube.lee" Date: Sat, 1 Feb 2025 23:09:31 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BA=90=EB=A6=AD=ED=84=B0=20=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=20=ED=95=84=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scripts/Common/PlayerDataManager.cs | 1 - .../Gameton/Scripts/GameData/PlayerData.cs | 37 +++++++++++++++++-- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/Gameton-06/Assets/Gameton/Scripts/Common/PlayerDataManager.cs b/Gameton-06/Assets/Gameton/Scripts/Common/PlayerDataManager.cs index 86e5b11f..e325d95b 100644 --- a/Gameton-06/Assets/Gameton/Scripts/Common/PlayerDataManager.cs +++ b/Gameton-06/Assets/Gameton/Scripts/Common/PlayerDataManager.cs @@ -21,7 +21,6 @@ namespace TON if (players == null) { players = new List(); - Debug.LogError("⚠️ Player data loading failed. Check if 'Player.json' exists in Resources folder."); } } } diff --git a/Gameton-06/Assets/Gameton/Scripts/GameData/PlayerData.cs b/Gameton-06/Assets/Gameton/Scripts/GameData/PlayerData.cs index ec182b84..5fa750eb 100644 --- a/Gameton-06/Assets/Gameton/Scripts/GameData/PlayerData.cs +++ b/Gameton-06/Assets/Gameton/Scripts/GameData/PlayerData.cs @@ -7,12 +7,43 @@ namespace TON [System.Serializable] public class PlayerData { + // 캐릭터 아이디 public int id; + // 캐릭터 이미지 타입 (w/b) public string type; + // 캐릭터 이름 public string name; - public float health; - public float score; - public int chance; + // 캐릭터 레벨 + public int level; + // 캐릭터 경험치 + public int experience; + // 캐릭터 체력 + public int hp; + // 캐릭터 마나(스킬 포인트) + public int mp; + // 기본 공격력 + public int attackPower; + // 기본 방어력 + public int defensivePower; + // 캐릭터 이동 속도 + public int speed; + // 캐릭터 크리티컬 수치 + public int critical; + + public PlayerData(int i, string t, string n) + { + id = i; + type = t == "BlackCat" ? "b" : "w"; + name = n; + level = 1; + experience = 0; + hp = 100; + mp = 100; + attackPower = 50; + defensivePower = 30; + speed = 100; + critical = 30; + } } }