コード例 #1
0
        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;
        }
コード例 #2
0
 public Status()
 {
     hp    = new Hp();
     mp    = new Mp();
     exp   = new Exp();
     level = new Level();
 }
コード例 #3
0
        //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);
        }
コード例 #4
0
        /* コンストラクタ */
        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++;
            }
        }