Пример #1
0
    public void Destroy()
    {
        foreach (var row in LevelGrid)
        {
            foreach (var obj in row)
            {
                MonoBehaviour.Destroy(obj.gameObject);
            }
            row.Clear();
        }
        LevelGrid.Clear();

        foreach (var obj in LevelEnvironmentObjects)
        {
            MonoBehaviour.Destroy(obj.gameObject);
        }
        LevelEnvironmentObjects.Clear();

        foreach (var obj in LevelEnemies)
        {
            MonoBehaviour.Destroy(obj.gameObject);
        }
        LevelEnemies.Clear();

        LightSourceMap.Clear();

        LightSourceListenerMap.Clear();

        ObstructionMap.Clear();

        SpacePlayerOccupations.Clear();
    }
Пример #2
0
 public bool HasObstruction(Vector3 position)
 {
     return(ObstructionMap.ContainsKey(position) && ObstructionMap[position].IsObstructing());
 }