public void StartingVFX(float passed_time) { for (int i = 0; i < infrastructure_offsets.Count; i++) { if (infrastructure_offsets[i] == -1) { continue; } if (passed_time > infrastructure_offsets[i]) { // Debug.Log("infr animator is set"); // Start Expanding Infrastructure Animator infr_animator = infrastructure[i].GetComponent <Animator>(); if (infr_animator == null) { throw new System.Exception(infrastructure[i].name + " does not have an animator component"); } // Debug.Log(infrastructure[i].name + ": " + stuff_anim_number); infr_animator.SetInteger("expand", stuff_anim_number); infrastructure_offsets[i] = -1; } } for (int i = 0; i < PX_offsets.Count; i++) { if (PX_offsets[i] == -1) { continue; } if (passed_time > PX_offsets[i]) { // Debug.Log("px animator is set"); Activator px_activator = PX[i].GetComponent <Activator>(); if (px_activator == null) { throw new System.Exception(PX[i].name + " does not have an activator component"); } px_activator.ActivateChildren(); // Mark This Object As Started PX_offsets[i] = -1; } } if (passed_time > hex_offset) { // Debug.Log("main animator is set"); animator.SetBool("color", true); } }