feat: 캐릭터 스펙 정보 서버에 저장하도록 변경

This commit is contained in:
aube.lee
2025-03-09 20:46:25 +09:00
parent 9e3d3881da
commit 110dc3d86e
12 changed files with 188 additions and 103 deletions

View File

@@ -7,39 +7,23 @@ namespace TON
[System.Serializable]
public class PlayerData
{
// 캐릭터 아이디
public string id;
// 캐릭터 이미지 타입 (w/b)
// 필드 선언 (외부 수정 방지)
public string type;
// 캐릭터 이름
public string name;
// 캐릭터 레벨
public int level;
// 캐릭터 경험치
public int experience;
// 캐릭터 체력
public int hp;
// 캐릭터 마나(스킬 포인트)
public int mp;
// 기본 공격력
public float attackPower;
// 기본 방어력
public float defensivePower;
// 캐릭터 크리티컬 수치
public int critical;
public int level = 1;
public int experience = 0;
public int hp = 100;
public int mp = 100;
public float attackPower = 50f;
public float defensivePower = 30f;
public int critical = 30;
public PlayerData(int i, string t, string n)
public PlayerData() : this("w", "") { }
public PlayerData(string t, string n)
{
id = $"P{i:000}";
type = t == "BlackCat" ? "b" : "w";
name = n;
level = 1;
experience = 0;
hp = 100;
mp = 100;
attackPower = 50f;
defensivePower = 30f;
critical = 30;
}
}