public override void HandleCollision(GameObject other) { switch (other.GetObjectType()) { case GameTypes.BrickWall: case GameTypes.MetallWall: case GameTypes.Bomb: Position = prevPosition; break; } }
public override void HandleCollision(GameObject other) { base.HandleCollision(other); switch (other.GetObjectType()) { case GameTypes.Enemy: IsDie = true; Game.Trash.Add(this); Game.IsGameOver = true; break; } }
/// <summary> /// Обрабатывает столкновение /// </summary> public override void HandleCollision(GameObject other) { switch (other.GetObjectType()) { case GameTypes.Enemy: case GameTypes.BrickWall: other.IsDie = true; Game.Trash.Add(other); break; case GameTypes.Player: other.IsDie = true; Game.Trash.Add(other); Game.IsGameOver = true; break; case GameTypes.MetallWall: timer = 1; break; } }