Exemple #1
0
        internal Player(PlayerHeader h)
            : base(new Vec(Game.WINDOW_R, Game.WINDOW_R), 0, DXImage.Instance.Player, new Vec(0, -1).Rad)
        {
            this.name  = h.name;
            this.maxDG = h.dg;
            this.maxSG = h.sg;

            this.lua = Script.Instance.lua;

            var initFunc = (LuaFunction)((LuaTable)lua[h.className])["new"];

            this.luaObject = (LuaTable)initFunc.Call(this)[0];

            this.updateFunc = (LuaFunction)this.luaObject["update"];

            this.drawFunc    = (LuaFunction)this.luaObject["draw"];
            this.disposeFunc = (LuaFunction)this.luaObject["dispose"];

            this.normalFunc  = (LuaFunction)this.luaObject["normal"];
            this.specialFunc = (LuaFunction)this.luaObject["special"];
            this.killerFunc  = (LuaFunction)this.luaObject["killer"];
            this.dopingFunc  = (LuaFunction)this.luaObject["doping"];
            this.counterFunc = (LuaFunction)this.luaObject["counter"];

            this.life = true;
        }
Exemple #2
0
        /// <summary>
        /// 新しいインスタンスを作成します
        /// </summary>
        /// <param name="enemy">敵</param>
        /// <param name="equipment">装備</param>
        internal Game(EnemyHeader enemy, PlayerHeader equipment)
        {
            this.player = new Player(equipment);

            this.boss = new Enemy(enemy, player);

            this.battle       = 0;
            this.playerAttack = new List <AttackObject>();
            this.enemyAttack  = new List <AttackObject>();
            this.screen       = DX.MakeScreen(Game.WINDOW_R * 2, Game.WINDOW_R * 2);
        }
Exemple #3
0
 /// <summary>
 /// タイトル画面、ゲーム画面等を場合に応じて呼び出します
 /// </summary>
 private static void Update()
 {
     if (Program.title != null)//タイトル画面なら
     {
         Program.title.Process();
         if (count % Config.Instance.FrameSkip == 0)
         {
             Program.title.Draw();
         }
         if (!Program.title.Need)
         {
             Program.title         = null;
             Program.equipmentMenu = new TreeMenu <PlayerHeader>(Program.ZIKI_MSG, Script.PlayerH);
         }
     }
     else if (Program.equipmentMenu != null)//装備選択画面なら
     {
         Program.equipmentMenu.Process();
         if (count % Config.Instance.FrameSkip == 0)
         {
             Program.equipmentMenu.Draw();
         }
         if (!Program.equipmentMenu.Need)
         {
             Program.equipment     = Program.equipmentMenu.Header;
             Program.equipmentMenu = null;
             Program.missionMenu   = new TreeMenu <EnemyHeader>("敵を選択して下さい。", Script.EnemyH);
         }
     }
     else if (Program.missionMenu != null)//敵選択画面なら
     {
         Program.missionMenu.Process();
         if (count % Config.Instance.FrameSkip == 0)
         {
             Program.missionMenu.Draw();
         }
         if (!Program.missionMenu.Need)
         {
             if (Program.missionMenu.Decision)
             {
                 Program.missionData = Program.missionMenu.Header;//ミッションデータ取得
                 Program.missionMenu = null;
                 Program.game        = new Game(Program.missionData, Program.equipment);
             }
             else
             {
                 Program.missionMenu   = null;
                 Program.equipmentMenu = new TreeMenu <PlayerHeader>(Program.ZIKI_MSG, Script.PlayerH);
             }
         }
     }
     else//ゲーム画面なら
     {
         Program.game.Process();
         if (count % Config.Instance.FrameSkip == 0)
         {
             Program.game.Draw();
         }
         if (!Program.game.Need)
         {
             DX.SetBackgroundColor(0, 0, 0);
             Program.game          = null;
             Program.equipmentMenu = new TreeMenu <PlayerHeader>(Program.ZIKI_MSG, Script.PlayerH);
         }
     }
     count++;
 }