void StartGame() { ShowGameScreen(); int numberOfAllies = allies.transform.childCount; for (int i = numberOfAllies - 1; i >= 0; i--) { Destroy(allies.transform.GetChild(i).gameObject); } if (cameraZoom != null) { StopCoroutine(cameraZoom); } StartCoroutine(ZoomOutCamera()); Score = 0; StartCoroutine(EnergyBarBehavior.EnergyLoading()); EnergyBarBehavior.isRegenerationOn = true; }
void OnDestroy() { instance = null; }
void Awake() { instance = this; }
void Start() { energybar = EnergyBarBehavior.instance; button = GetComponent <Button>(); Debug.Assert(skillActivator != null, "no skill activator set", this); }