private bool CheckIntersectionWithMonster(CharacterWithScore player) { foreach (Character monster in _game.Monsters) { if (CheckIntersection(player, CharactersSize.Player, monster, CharactersSize.Monster)) { return(true); } } return(false); }
private bool CheckIntersectionWithCoins(CharacterWithScore player) { for (int i = 0; i < _game.Coins.Count; i++) { if (CheckIntersection(player, CharactersSize.Player, new Obsticle(_game.Coins.ElementAt(i), new Position(CharactersSize.coin)))) { _game.Coins.RemoveAt(i); return(true); } } return(false); }