private void RemoveMapSpawnpoint(int index) { var spawnpoint = _context.GetEntitiesWithSpawnpoint(index) .FirstOrDefault(); if (spawnpoint != null) { Debug.Log("Spawnpoint removed " + index + " : " + spawnpoint.mapPosition); spawnpoint.RemoveSpawnpoint(); } }
private Position GetBossPosition() { var sp = _tileContext.GetEntitiesWithSpawnpoint(-1).FirstOrDefault(); if (sp == null) { throw new Exception("Boss spawnpoint is not set in map"); } return(sp.mapPosition.Value); }