public void GenerateInvader() { Random random = new Random(); int x = random.Next(10, 70); var invader = new Invader(x, 0); Invaders.Add(invader); }
private bool CheckKill(Bullet bullet) { if (bullet != null) { var killedInvader = Invaders.Find(x => x.PositionX == bullet.PositionX && x.PositionY == bullet.PositionY); if (killedInvader != null) { Invaders.Remove(killedInvader); GameScore++; return(true); } return(false); } return(false); }