private List <Entity> CheckObstacles(Entity testEntity) { List <Entity> res; MainMap.CheckCollision(testEntity, out res); foreach (var entity in Pikes) { if (CheckCollision(testEntity, entity) != CollisionType.NoCollision) { if (testEntity is HeroEntity) { heroEntity.HealthPoints -= 1; } //Console.WriteLine(CheckCollision(testEntity, entity)); res.Add(entity); } } return(res); }