Ejemplo n.º 1
0
 public void Update()
 {
     if (!onSwamp || GameWindow.counter % 2 == 0)
     {
         if (GetWhere() < 5)
         {
             if (pointDirection == GetWhere())
             {
                 if (ColissionEngine.TankColission(GetWhere(), this) == false)
                 {
                     tankColision[GetWhere()] = false;
                     TankMove(GetWhere());
                 }
                 else
                 {
                     if (GetWhere() < 5)
                     {
                         tankColision[GetWhere()] = true;
                     }
                     objectPicture.Refresh();
                 }
             }
             else
             {
                 ChangeDirection(GetWhere());
             }
         }
     }
 }
Ejemplo n.º 2
0
 public void Update()
 {
     if (tank.shoot)
     {
         if (ColissionEngine.BulletColission(pointDirection, this) == false)
         {
             if (!super)
             {
                 BulletMove();
             }
             else
             {
                 objectPicture.BackColor = Color.LightCyan;
                 BulletMove(tank.pointDirection);
             }
         }
         else
         {
             GameWindow.allEvents.gameEvent.Detach(this);
             super = false;
         }
     }
 }