コード例 #1
0
        public void Update()
        {
            Keyboard_input.Update();

            if (Keyboard_input.Key_Click(Keys.Space))
            {
                game_1.Start_game();
            }
        }
コード例 #2
0
        public void Update(GameTime game_time)
        {
            Keyboard_input.Update();

            if (Keyboard.GetState().IsKeyDown(Keys.Space))
            {
                game_1.Play_game();
            }

            Player.powered_duration = 500;
        }
コード例 #3
0
ファイル: Player.cs プロジェクト: Joppeloppe/OOSP---Pac-Man
        private void Player_Movement_Input()
        {
            if (Keyboard_input.Key_Click(Keys.W))
            {
                direction_up    = true;
                direction_left  = false;
                direction_down  = false;
                direction_right = false;
                direction_none  = false;

                entity_sprite_fx = SpriteEffects.None;
            }

            if (Keyboard_input.Key_Click(Keys.A))
            {
                direction_up    = false;
                direction_left  = true;
                direction_down  = false;
                direction_right = false;
                direction_none  = false;

                entity_sprite_fx = SpriteEffects.FlipHorizontally;
            }

            if (Keyboard_input.Key_Click(Keys.S))
            {
                direction_up    = false;
                direction_left  = false;
                direction_down  = true;
                direction_right = false;
                direction_none  = false;

                entity_sprite_fx = SpriteEffects.None;
            }

            if (Keyboard_input.Key_Click(Keys.D))
            {
                direction_up    = false;
                direction_left  = false;
                direction_down  = false;
                direction_right = true;
                direction_none  = false;

                entity_sprite_fx = SpriteEffects.None;
            }
        }
コード例 #4
0
        public void Update(GameTime game_time)
        {
            Keyboard_input.Update();

            if (Content_Manager.candies.Count == 0)
            {
                game_1.Won_game();
            }

            if (Player.player_life == 0)
            {
                game_1.Lost_game();
            }

            game_1.Window.Title = "Jumpin' Pumpkin        Score:" + Player.score + "  Life:" + Player.player_life + "   Power-up duration:" + Player.powered_duration / 100 + " ";

            Update_level(game_time);
        }
コード例 #5
0
        public void Update()
        {
            Keyboard_input.Update();

            Player.score = 0;
        }