Esempio n. 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();
    }
Esempio n. 2
0
 public void ToggleLight(char lightSource)
 {
     if (LightSourceListenerMap.ContainsKey(lightSource))
     {
         foreach (ILightSourceListener lightSourceListener in LightSourceListenerMap[lightSource])
         {
             lightSourceListener.ToggleLight();
         }
     }
 }
Esempio n. 3
0
 public void SetLightActive(char lightSource, bool state)
 {
     if (LightSourceListenerMap.ContainsKey(lightSource))
     {
         foreach (ILightSourceListener lightSourceListener in LightSourceListenerMap[lightSource])
         {
             lightSourceListener.SetLightActive(state);
         }
     }
 }