public static void RespawnAll() { for (int i = 0; i < PanzeeManager.Instance.panzeeArray.Length; i++) { Panzee panzee = PanzeeManager.Instance.panzeeArray[i]; if (panzee != null && panzee.gameObject.activeSelf) { panzee.Respawn(); } } }
// Use this for initialization void Start() { Wakta.Instance.Respawn(); Wakta.Instance.UnPause(); for (int i = 0; i < PanzeeManager.Instance.panzeeArray.Length; i++) { Panzee panzee = PanzeeManager.Instance.panzeeArray[i]; if (panzee != null && panzee.gameObject.activeSelf) { panzee.Respawn(); panzee.UnPause(); } } if (FadeManager.Instance != null) { FadeManager.Instance.FadeIn(1); } }
public void SpawnPanzee(string name, string greeting) { if (!isSpawnable) { return; } Panzee panzee = panzeePool.DequeueObjectPool().GetComponent <Panzee>(); panzee.name = name; panzee.hpParent.SetActive(false); if (Wakta.Instance.selected != null) { panzee.SetAlpha(0.3f); } AddPanzee(name, panzee); panzee.gameObject.SetActive(true); panzee.SetText(greeting); panzee.Respawn(); }