void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); natureEvolution = GetComponent <NatureEvolution>(); }
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); } }