示例#1
0
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }

        DontDestroyOnLoad(gameObject);
        natureEvolution = GetComponent <NatureEvolution>();
    }
示例#2
0
    private void Start()
    {
        natureEvolution = GameManagement.instance.NatureEvolution;

        if (animalPop == null)
        {
            animalPop = new UnityEvent();
            animalPop.AddListener(AnimalSpawning);
        }

        if (fireBurn == null)
        {
            fireBurn = new UnityEvent();
            fireBurn.AddListener(FireStart);
        }

        if (seedPop == null)
        {
            seedPop = new UnityEvent();
            seedPop.AddListener(SeedPop);
        }
    }