예제 #1
0
        /// <summary>
        /// Reset ball and paddle after losing a live
        /// </summary>
        public void Reset()
        {
            Player.CurrentCombo = 0;

            Paddle = ModelFactory.CreatePaddle();
            Balls  = ModelFactory.CreateBall();
            PowerUps.Clear();
        }
예제 #2
0
 // retornar o jogo para as condições iniciais
 private void Reset()
 {
     State = GameState.Menu;
     Levels.Clear();
     UpdatePowerUps(100000f);
     PowerUps.Clear();
     PostProcessor.Chaos   = false;
     PostProcessor.Confuse = false;
     Balls.Clear();
     Init();
 }
예제 #3
0
 // retornar o jogador, powerups, efeitos e bolas para o estado inicial
 // mas sem alterar o estado do nível atual
 private void ResetPlayer()
 {
     UpdatePowerUps(100000);
     PostProcessor.Chaos   = false;
     PostProcessor.Confuse = false;
     PowerUps.Clear();
     Player.Position = new Vector2((Width / 2) - (PLAYER_SIZE.X / 2), Height - PLAYER_SIZE.Y - 84f);
     Player.Size     = PLAYER_SIZE;
     Player.Color    = new Vector3(1);
     Ball.Reset(Player.Position + new Vector2((Player.Size.X / 2) - BALL_RADIUS, -BALL_RADIUS * 2f), new Vector2(GetRandomBallSpeed(), Difficulty.BallUpSpeed));
     Ball.Size = new Vector2(2f * BALL_RADIUS);
 }