Exemple #1
0
    public static SpawnerOrganiser GetInstance()
    {
        if (!Instance)
        {
            _container = new GameObject {name = "Spawner"};
            Instance = _container.AddComponent(typeof(SpawnerOrganiser)) as SpawnerOrganiser;
        }

        return Instance;
    }
    private void Start()
    {
        _food = (GameObject)Resources.Load("Prefabs/Foodbit");
        string name = this.name.ToLower();

        _settingsReader = SettingsReader.GetInstance();
        TempDataTracker.GetInstance();
        UiDepthHandler          = UIDepthHandler.GetInstance();
        SpawnerOrganiser        = SpawnerOrganiser.GetInstance();
        CreatureCounterObservor = CreatureCounterObservor.GetInstance();

        SetupVariables();

        Energy = TotalEnergy;

        Creatures = new ArrayList();
        Foods     = new ArrayList();
    }