Пример #1
0
        private void EditorButton_Click(object sender, EventArgs e)
        {
            if (GameRunning)
            {
                MessageBox.Show(this, "Stop the current game first.", "<°)))><", MessageBoxButtons.AbortRetryIgnore);
                return;
            }

            GameRunning = true;

            Root r = Root.Instance;

            r.Authoritive = true;

            Cheetah.Forms.EditorForm vf = new Cheetah.Forms.EditorForm();
            vf.Show();
            r.ClientClient(new string[] { }, vf.glControl1);

            //r.ClientClient(new string[] { });
            IUserInterface ui = r.UserInterface;

            Editor v = new Editor();

            Root.Instance.CurrentFlow = v;
            v.Start();
            r.CurrentFlow = v;



            v.Start();

            r.ClientLoop();

            //Cheetah.Root.Instance.LocalObjects.Remove(h);

            r.ResourceManager.UnloadAll();
            r.UserInterface.Dispose();
            r.UserInterface = null;
            vf.Close();

            GameRunning = false;
        }
Пример #2
0
        private void EditorButton_Click(object sender, EventArgs e)
        {
            if (GameRunning)
            {
                    MessageBox.Show(this, "Stop the current game first.", "<°)))><", MessageBoxButtons.AbortRetryIgnore);
                return;
            }

            GameRunning = true;

            Root r = Root.Instance;

            r.Authoritive = true;

            Cheetah.Forms.EditorForm vf = new Cheetah.Forms.EditorForm();
            vf.Show();
            r.ClientClient(new string[] { }, vf.glControl1);

            //r.ClientClient(new string[] { });
            IUserInterface ui = r.UserInterface;

            Editor v = new Editor();
            Root.Instance.CurrentFlow = v;
            v.Start();
            r.CurrentFlow = v;

            v.Start();

            r.ClientLoop();

            //Cheetah.Root.Instance.LocalObjects.Remove(h);

            r.ResourceManager.UnloadAll();
            r.UserInterface.Dispose();
            r.UserInterface = null;
            vf.Close();

            GameRunning = false;
        }