예제 #1
0
파일: Form1.cs 프로젝트: valekkp/Games
        private void timer_Tick(object sender, EventArgs e)
        {
            switch (game.GetState())
            {
            case Game.GameState.Waiting:
                GrowStick();
                break;

            case Game.GameState.StickFalling:
                DropStick();
                break;

            case Game.GameState.HeroMoving:
                MoveHero();
                break;

            case Game.GameState.BoardMoving:
                game.MoveBoard();
                break;

            case Game.GameState.HeroFalling:
                DropHero();
                break;
            }
            PlayingBoardPictureBox.Refresh();
        }
예제 #2
0
파일: Form1.cs 프로젝트: valekkp/Games
        public GameForm()
        {
            InitializeComponent();
            SetElementsParameters();
            game.Start();

            timer.Interval = 1;
            game.Restart();
            timer.Start();
            PlayingBoardPictureBox.Refresh();
        }