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()); } } } }
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; } } }