IEnumerator RaiseFloorRight(float voltage, float time) { while (!_done_shaking) { yield return(new WaitForSeconds(0.1f)); } _done_shaking = false; Debug.Log("Floor Right" + " " + _current_shake_num); _FloorController.enable(); _FloorController.raiseRight(voltage); yield return(new WaitForSeconds(time)); _done_shaking = true; }