Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            WGame Game = new WGame();

            Game.SetLogCallback(LogCallback);
            //Game.SetScriptCompilerCallback(CompilerErrorCallback);

            /*
             * WFrame Frame = new WFrame(Game);
             * Frame.Events.Add("aaa");
             * Frame.Events.Add("bbb");
             * Frame.Events.Add("ccc");
             *
             * MessageBox.Show(Frame.Events.IndexOf("bbb").ToString());
             *
             * foreach(String S in Frame.Events)
             * {
             *      MessageBox.Show(S);
             * }
             * Frame.Events.Clear();
             */
            Game.InitializeWindowed(this, true, @"C:\Program Files\WME DevKit\projects\wme_demo\wme_demo.wpr");
            Game.FrameInit();
            Game.FrameFinish();

            //WAdScene Scene;

            Game.Dispose();
        }
        //////////////////////////////////////////////////////////////////////////
        public Sprite(WGame Game, SpriteOptimizer optimizer)
        {
            this.Game = Game;
            this.Optimizer = optimizer;

            this.IsChanged = false;
        }
Ejemplo n.º 3
0
        //////////////////////////////////////////////////////////////////////////
        public Sprite(WGame Game, SpriteOptimizer optimizer)
        {
            this.Game      = Game;
            this.Optimizer = optimizer;

            this.IsChanged = false;
        }
        private void button1_Click(object sender, EventArgs e)
        {
            WGame Game = new WGame();
            Game.SetLogCallback(LogCallback);
            //Game.SetScriptCompilerCallback(CompilerErrorCallback);

            /*
            WFrame Frame = new WFrame(Game);
            Frame.Events.Add("aaa");
            Frame.Events.Add("bbb");
            Frame.Events.Add("ccc");

            MessageBox.Show(Frame.Events.IndexOf("bbb").ToString());

            foreach(String S in Frame.Events)
            {
                MessageBox.Show(S);
            }
            Frame.Events.Clear();
            */
            Game.InitializeWindowed(this, true, @"C:\Program Files\WME DevKit\projects\wme_demo\wme_demo.wpr");
            Game.FrameInit();
            Game.FrameFinish();

            //WAdScene Scene;

            Game.Dispose();
        }
Ejemplo n.º 5
0
        //////////////////////////////////////////////////////////////////////////
        public void Process()
        {
            Game = new WGame();
            Game.InitializeSimple(ProjectFile);

            string rootDir = Path.GetDirectoryName(ProjectFile);

            ProcessDir(rootDir);

            Game.Dispose();

            AddLog(string.Format("Finished. Saved {0} pixels in total (that's approximately {1} MB of video memory).", TotalSavedPixels, TotalSavedPixels * 4 / 1024 / 1024));
        }
Ejemplo n.º 6
0
        //////////////////////////////////////////////////////////////////////////
        public bool Create(WGame Game, string ProjectFile, string LogFile)
        {
            game = Game;
            bool Ret = this.Game.InitializeWindowed(this, true, ProjectFile, LogFile);

            if (Ret)
            {
                Application.Idle += new EventHandler(OnAppIdle);
                this.Resize      += new EventHandler(OnResize);

                Form ParentForm = FindForm();
                if (ParentForm != null)
                {
                    ParentForm.Activated  += new EventHandler(OnFormActivate);
                    ParentForm.Deactivate += new EventHandler(OnFormDeactivate);
                }
            }

            return(Ret);
        }
 //////////////////////////////////////////////////////////////////////////
 public void Release()
 {
     Application.Idle -= new EventHandler(OnAppIdle);
     game = null;
 }
        //////////////////////////////////////////////////////////////////////////
        public bool Create(WGame Game, string ProjectFile, string LogFile)
        {
            game = Game;
            bool Ret = this.Game.InitializeWindowed(this, true, ProjectFile, LogFile);
            if(Ret)
            {
                Application.Idle += new EventHandler(OnAppIdle);
                this.Resize += new EventHandler(OnResize);

                Form ParentForm = FindForm();
                if (ParentForm != null)
                {
                    ParentForm.Activated += new EventHandler(OnFormActivate);
                    ParentForm.Deactivate += new EventHandler(OnFormDeactivate);
                }
            }

            return Ret;
        }
 //////////////////////////////////////////////////////////////////////////
 public bool Create(WGame Game, string ProjectFile)
 {
     return Create(Game, ProjectFile, null);
 }
Ejemplo n.º 10
0
 //////////////////////////////////////////////////////////////////////////
 public bool Create(WGame Game, string ProjectFile)
 {
     return(Create(Game, ProjectFile, null));
 }
Ejemplo n.º 11
0
 //////////////////////////////////////////////////////////////////////////
 public void Release()
 {
     Application.Idle -= new EventHandler(OnAppIdle);
     game              = null;
 }