Exemplo n.º 1
0
 public static BombermanPlayerTwo getInstance(bool requireNewInstance = false)
 {
     if (bomberManPlayerTwo == null || requireNewInstance)
     {
         BombermanPlayerTwo.bomberManPlayerTwo = new BombermanPlayerTwo(new Rectangle(670, 380, 40, 35));
     }
     return(BombermanPlayerTwo.bomberManPlayerTwo);
 }
Exemplo n.º 2
0
 private void changeFocus(GameTime gameTime)
 {
     if (gameTime.TotalGameTime.Subtract(BombermanGame.lastDieTime).Seconds > 30)
     {
         BombermanGame.lastDieTime = gameTime.TotalGameTime;
         if (bomberman is BombermanPlayerOne)
         {
             bomberman = BombermanPlayerTwo.getInstance();
         }
         else
         {
             bomberman = BombermanPlayerOne.getInstance();
         }
     }
 }