Example #1
0
        private void ui_yes_Click(object sender, EventArgs e)
        {
            mon = new Define.Monster();

            mon.Name         = ui_name.Text;
            mon.Level        = int.Parse(ui_lv.Text);
            mon.HP           = int.Parse(ui_hp.Text);
            mon.Strength     = int.Parse(ui_str.Text);
            mon.Physique     = int.Parse(ui_phy.Text);
            mon.Intelligence = int.Parse(ui_int.Text);
            mon.Agility      = int.Parse(ui_spd.Text);

            mon.BattleSize = new Size(int.Parse(ui_w.Text), int.Parse(ui_h.Text));

            mon.ScriptInit = ui_scriptinit.Text;
            mon.ScriptAI   = ui_ai.Text;

            mon.EXP = int.Parse(ui_exp.Text);

            MonsterType mt;

            if (ui_montyp.Text == "生化")
            {
                mt = MonsterType.BIO;
            }
            else
            {
                mt = MonsterType.MEC;
            }
            mon.MonsterType = mt;

            //int i = 0;
            //i = (int)MetalX.Define.BattleState.Stand;
            //mon.BattleMovieIndexers[i] = new Define.MemoryIndexer(ui_stand.Text);

            //i = (int)MetalX.Define.BattleState.Block;
            //mon.BattleMovieIndexers[i] = new Define.MemoryIndexer(ui_block.Text);

            //i = (int)MetalX.Define.BattleState.Hit;
            //mon.BattleMovieIndexers[i] = new Define.MemoryIndexer(ui_hit.Text);

            //i = (int)MetalX.Define.BattleState.Fight;
            //mon.BattleMovieIndexers[i] = new Define.MemoryIndexer(ui_fight.Text);

            //i = (int)MetalX.Define.BattleState.Weapon;
            //mon.BattleMovieIndexers[i] = new Define.MemoryIndexer(ui_weapon.Text);

            //i = (int)MetalX.Define.BattleState.Item;
            //mon.BattleMovieIndexers[i] = new Define.MemoryIndexer(ui_item.Text);

            //i = (int)MetalX.Define.BattleState.Run;
            //mon.BattleMovieIndexers[i] = new Define.MemoryIndexer(ui_run.Text);

            //i = (int)MetalX.Define.BattleState.Miss;
            //mon.BattleMovieIndexers[i] = new Define.MemoryIndexer(ui_miss.Text);
        }
Example #2
0
        private void ui_load_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.Filter           = "MetalX Monster File|*.mxmonster";
            ofd.RestoreDirectory = true;
            if (ofd.ShowDialog() == DialogResult.OK)
            {
                mon = (MetalX.Define.Monster)Util.LoadObject(ofd.FileName);
                update_ui();
            }
        }
Example #3
0
 private void ui_load_Click(object sender, EventArgs e)
 {
     OpenFileDialog ofd = new OpenFileDialog();
     ofd.Filter = "MetalX Monster File|*.mxmonster";
     ofd.RestoreDirectory = true;
     if (ofd.ShowDialog() == DialogResult.OK)
     {
         mon = (MetalX.Define.Monster)Util.LoadObject(ofd.FileName);
         update_ui();
     }
 }
Example #4
0
        private void ui_yes_Click(object sender, EventArgs e)
        {
            mon = new Define.Monster();

            mon.Name = ui_name.Text;
            mon.Level = int.Parse(ui_lv.Text);
            mon.HP = int.Parse(ui_hp.Text);
            mon.Strength = int.Parse(ui_str.Text);
            mon.Physique = int.Parse(ui_phy.Text);
            mon.Intelligence = int.Parse(ui_int.Text);
            mon.Agility = int.Parse(ui_spd.Text);

            mon.BattleSize = new Size(int.Parse(ui_w.Text), int.Parse(ui_h.Text));

            mon.ScriptInit = ui_scriptinit.Text;
            mon.ScriptAI = ui_ai.Text;

            mon.EXP = int.Parse(ui_exp.Text);

            MonsterType mt;
            if (ui_montyp.Text == "生化")
            {
                mt = MonsterType.BIO;
            }
            else
            {
                mt = MonsterType.MEC;
            }
            mon.MonsterType = mt;

            //int i = 0;
            //i = (int)MetalX.Define.BattleState.Stand;
            //mon.BattleMovieIndexers[i] = new Define.MemoryIndexer(ui_stand.Text);

            //i = (int)MetalX.Define.BattleState.Block;
            //mon.BattleMovieIndexers[i] = new Define.MemoryIndexer(ui_block.Text);

            //i = (int)MetalX.Define.BattleState.Hit;
            //mon.BattleMovieIndexers[i] = new Define.MemoryIndexer(ui_hit.Text);

            //i = (int)MetalX.Define.BattleState.Fight;
            //mon.BattleMovieIndexers[i] = new Define.MemoryIndexer(ui_fight.Text);

            //i = (int)MetalX.Define.BattleState.Weapon;
            //mon.BattleMovieIndexers[i] = new Define.MemoryIndexer(ui_weapon.Text);

            //i = (int)MetalX.Define.BattleState.Item;
            //mon.BattleMovieIndexers[i] = new Define.MemoryIndexer(ui_item.Text);

            //i = (int)MetalX.Define.BattleState.Run;
            //mon.BattleMovieIndexers[i] = new Define.MemoryIndexer(ui_run.Text);

            //i = (int)MetalX.Define.BattleState.Miss;
            //mon.BattleMovieIndexers[i] = new Define.MemoryIndexer(ui_miss.Text);
        }
Example #5
0
        void DrawMonster(Monster mon)
        {
            if (mon.HP < 0)
            {
                return;
            }

            if (mon.BattleMovie == null)
            {
                return;
            }

            Vector3 loc = mon.BattleMovie.DrawLocation;
            loc = Util.Vector3AddVector3(loc, this.ScreenOffsetPixel);
            Color color = Util.MixColor(ColorFilter, mon.BattleMovie.ColorFilter);
            game.DrawMetalXTexture(mon.BattleMovie.MXT, mon.BattleMovie.DrawZone, loc, mon.BattleMovie.TileSize2X, 0, color);
            game.DrawText(mon.HP.ToString(), Util.Vector32Point(loc), Color.White);
        }