private IEnumerator DeleteConnectPoints() { yield return(new WaitForSeconds(0.5f)); float time = 1f / this.ConnectionTransform.Count; var lines = this.ConnectionLineTransform.ToArray(); var points = this.ConnectionTransform.ToArray(); for (int i = 0; i < points.Length; i++) { points[i].GetComponent <ConnectPointController>().Burst(); if (i < lines.Length) { Destroy(lines[i].gameObject); } yield return(new WaitForSeconds(time)); } this.ConnectionLineTransform = new List <Transform>(); this.ConnectionTransform = new List <Transform>(); yield return(new WaitForSeconds(0.5f)); StageUnitController.StageComplete(); }
private void Start() { if (instance != null) { Destroy(instance.gameObject); } instance = this; }