示例#1
0
 public BattlePresenter(BattleUserControl view)
 {
     View = view;
     Battle = new GameControl(ProgramData.PlayerName);
     View.BattleFirstPlayerName = Battle.Human.Name;
     View.BattleFirstPlayerHpMax = Battle.Human.MaxHp;
     View.BattleSecondPlayerName = Battle.Npc.Name;
     View.BattleSecondPlayerHpMax = Battle.Npc.MaxHp;
     RefreshHealthProgressBars();
     View.CreateRadioButtons();
 }
示例#2
0
        public void SwitchScene(Scene scene)
        {
            UserControl ctrl = null;
            switch (scene)
            {
                case Scene.Main:
                    ctrl = new MainUserControl();

                    break;

                case Scene.Battle:
                    ctrl = new BattleUserControl();
                    break;

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