public bool CollidesWithTile(IPhysicalEntity physicalEntity) { List <Vector2I> coverTilesCoordinates = physicalEntity.CoverTiles(); bool colliding = !coverTilesCoordinates.TrueForAll(x => !m_atlas.ContainsCollidingTile(x)); return(colliding); }
public bool CollidesWithTile(IPhysicalEntity physicalEntity) { if (!physicalEntity.ElasticCollision && !physicalEntity.InelasticCollision) { return(false); } List <Vector2I> coverTilesCoordinates = physicalEntity.CoverTiles(); bool colliding = !coverTilesCoordinates.TrueForAll(x => !m_atlas.ContainsCollidingTile(x)); return(colliding); }