Ejemplo n.º 1
0
 protected void switchMinion(Controls controls, MinionSelector ms)
 {
     if (player == 1)
     {
         if (controls.onPress(Keys.A, Buttons.DPadLeft))
         {
             ms.moveLeft();
         }
         else if (controls.onPress(Keys.D, Buttons.DPadRight))
         {
             ms.moveRight();
         }
     }
     else if (player == 2)
     {
         if (controls.onPress(Keys.Left, Buttons.DPadLeft))
         {
             ms.moveLeft();
         }
         else if (controls.onPress(Keys.Right, Buttons.DPadRight))
         {
             ms.moveRight();
         }
     }
 }
Ejemplo n.º 2
0
 public void Update(Controls controls, GameTime gameTime, LaneSelector ls, MinionSelector ms)
 {
     switchLanes(controls, ls);
     switchMinion(controls, ms);
     //			deployTroop (controls);
 }