Beispiel #1
0
        public MetalHunter()
        {
            game = new Game("MetalHunter");

            game.InitData();
            game.InitCom();

            game.LoadAllDotPNG(new Size(16, 16));
            game.LoadAllDotMP3();

            game.LoadAllDotMXScene();
            game.LoadAllDotMXNPC();
            game.LoadAllDotMXScript();
            game.LoadAllDotMXMovie();
            game.LoadAllDotMXMonster();

            InitFormBoxes();
            InitItems();

            game.ScriptManager.AppendDotMetalXScript("logo");
            game.ScriptManager.Execute();

            game.FormBoxManager.OnKeyUp += new KeyboardEvent(FormBoxManager_OnKeyUp);
            game.SceneManager.OnKeyUp += new KeyboardEvent(SceneManager_OnKeyUp);

            game.Start();
        }
Beispiel #2
0
        void open_scene(string fileName, bool isxml)
        {
            left_rect = new Rectangle();
            right_rect = new Rectangle();
            if (game != null)
            {
                game.Stop();
            }
            game = new Game(pictureBox1);
            game.InitData();
            game.InitCom();
            game.LoadAllDotPNG(new Size(game.Options.TileSizePixel.Width / 2, game.Options.TileSizePixel.Height / 2));
            game.LoadAllDotMXNPC();

            sceneMaker2D = new SceneMaker2D(game);

            if (isxml)
            {
                game.SCN = game.LoadDotMXSceneDotXML(fileName);
            }
            else
            {
                game.SCN = game.LoadDotMXScene(fileName);
            }

            update_pic_list();
            update_mus_list();
            update_npc_list();
            update_info();
            update_layer_selecter();
            update_monster_zone_list();

            pictureBox1.Size = game.SCN.SizePixel;

            tabControl1.SelectedIndex = 1;
            game.GameComs.Clear();
            game.MountGameCom(sceneMaker2D);
            game.Start();
        }
Beispiel #3
0
        void new_scene(Size size, Size tilesizepixel)
        {
            left_rect = new Rectangle();
            right_rect = new Rectangle();
            if (game != null)
            {
                game.Stop();
            }

            pictureBox1.Size = new Size(size.Width * tilesizepixel.Width, size.Height * tilesizepixel.Height);

            game = new Game(pictureBox1);
            game.InitCom();
            game.InitData();
            game.LoadAllDotPNG(new Size(tilesizepixel.Width / 2, tilesizepixel.Height / 2));
            game.LoadAllDotMXNPC();

            update_pic_list();
            update_mus_list();

            sceneMaker2D = new SceneMaker2D(game);

            int sw = size.Width;
            int sh = size.Height;
            int tw = tilesizepixel.Width;
            int th = tilesizepixel.Height;

            game.SCN = new Scene(new Size(sw, sh), new Size(tw, th));

            game.SCN.Name = ui_scenename.Text;
            game.SCN.FrameInterval = int.Parse(ui_framedelay.Text);

            create_layer_selecter();

            tabControl1.SelectedIndex = 1;
            game.GameComs.Clear();
            game.MountGameCom(sceneMaker2D);
            game.Start();
        }