Exemplo n.º 1
0
        public void SwitchScene(Scene scene)
        {
            UserControl ctrl = null;

            switch (scene)
            {
            case Scene.Main:
                ctrl = new MainUserControl();

                break;

            case Scene.Fight:
                ctrl = new FightUserControl();
                break;

            default:
                break;
            }
            if (ctrl != null)
            {
                ctrl.Dock = DockStyle.Fill;
                mainPanel.Controls.Clear();
                mainPanel.Controls.Add(ctrl);
            }
        }
Exemplo n.º 2
0
        public void SwitchScene(Scene scene)
        {
            UserControl ctrl = null;
            switch (scene)
            {
                case Scene.Main:
                    ctrl = new MainUserControl();

                    break;

                case Scene.Fight:
                    ctrl = new FightUserControl();
                    break;

                default:
                    break;
            }
            if (ctrl != null)
            {
                ctrl.Dock = DockStyle.Fill;
                mainPanel.Controls.Clear();
                mainPanel.Controls.Add(ctrl);
            }
        }