public int[] __ddef__ = { 5, 15, 30 }; /* レベルアップ時のdef伸びしろテーブル */ public Lv(ref Hp hp, ref Mp mp, ref Atk atk, ref Def def) : base(999, 1, 1) { this.hp = hp; this.mp = mp; this.atk = atk; this.def = def; }
//public Item item; /* コンストラクタ */ public Status() { name = "Alice"; atk = new Atk(); def = new Def(); hp = new Hp(); mp = new Mp(); lv = new Lv(ref hp, ref mp, ref atk, ref def); ex = new Ex(ref lv); slot = new Slot(ref hp, ref mp, ref atk, ref def); }
/* コンストラクタ */ public Slot(ref Hp hp, ref Mp mp, ref Atk atk, ref Def def, params int[] slots) { this.hp = hp; this.mp = mp; this.atk = atk; this.def = def; item = new int[NUM]; /* 可変長引数でアイテムを取得 */ int i = 0; foreach (int s in slots) { item[i] = s; i++; } }