예제 #1
0
        public Form1()
        {
            Application.Idle += HandleApplicationIdle;
            InitializeComponent();
            BackColor = Color.Black;
            game      = new Entities.Game(Width, Height);
            render    = new GraphicsHandler(CreateGraphics(), Color.Black, this.Width, this.Height);


            PlayerName.Text      = _gameState.GetCurrentPlayer().Name;
            PlayerName.BackColor = Color.Transparent;
            PlayerName.ForeColor = Color.White;
            timer1.Enabled       = true;
            timer1.Interval      = 1000 / 60;
            GameTimer.Enabled    = true;
            GameTimer.Interval   = 1000;
            Player1BaloonFactory = new BaloonFactory(true);
            MouseInput           = MouseInput.GetInstance();
            MouseInput.Attach(_gameState);
            Undo.Visible = false;

            _uiButtonsHandler = new UIButtonsHandler();
            SetButtonEnables();

            _mementosStorer = new MementosStorer();
        }
예제 #2
0
 public override void NextState(UIButtonsHandler buttonsHandler)
 {
     buttonsHandler.SetState(new SpawningMode());
 }
예제 #3
0
 public abstract void NextState(UIButtonsHandler buttonsHandler);