// Spin and create a circle burst of objects from each paw IEnumerator C_SpinnyHands(float StartDelay) { yield return(new WaitForSeconds(StartDelay)); // float RNG = Random.Range(0.50f, 0.55f); float RNG = 0.50f; if (LeftArm.gameObject.activeInHierarchy) { LeftArm.SetDeathTimer(0, 7); LeftArm.RotateDegrees(0, 1, 0, true); for (float I = 0; I < 5; I = I + RNG) { LeftArm.CircleBurst(I, 10, 1); } LeftArm.StopRotation(6); LeftArm.RotateToDegree(6, 1, 0, true); } if (RightArm.gameObject.activeInHierarchy) { RightArm.SetDeathTimer(0, 7); RightArm.RotateDegrees(0, 1, 0, true); for (float I = 0; I < 5; I = I + RNG) { RightArm.CircleBurst(I, 10, 1); } RightArm.StopRotation(6); RightArm.RotateToDegree(6, 1, 0, true); } for (float I = 0; I < 5; I = I + 0.51f) { CenterHead.PlayClip(I, Bullet1); } yield return(new WaitForSeconds(10)); }
// Final attack - head IEnumerator C_HeadAttack(float StartDelay) { CenterHead.WaveEffect_children(0, 0.8f, 30, 0, 0); CenterHead.ChangeColor_Children(0, Color.red, 0.3f); CenterHead.StopWaveEffect(3f); CenterHead.BreakRandomly(3f, 0, 2); CenterHead.SetColor(3, Color.red); CenterHead.RandomSprayOutwards(3.3f, 0.05f, 50, 2); CenterHead.SprayInDirection(3.3f, 30, new Vector2(-1, 4), 0.1f, 4); CenterHead.SprayInDirection(3.3f, 30, new Vector2(1, 4), 0.1f, 4); CenterHead.SprayInDirection(3.3f, 20, new Vector2(0, 1), 0.2f, 1); CenterHead.DestroyChildren(5, 0.08f); // LeftEye.SetColor_Random (8); LeftEye.CircleBurst(8, 20, 1); LeftEye.BreakCircleBurst(8.5f, 20, 0, 1); // RightEye.SetColor_Random (8); RightEye.CircleBurst(8, 20, 1.2f); RightEye.BreakCircleBurst(9, 20, 0, 1); for (float I = 3.1f; I < 6.1f; I = I + 0.1f) { CenterHead.PlayClip(I, Bullet1); } CenterHead.PlayClip(1, Predeath); RightEye.PlayClip(8, Death1); yield return(new WaitForSeconds(13)); // CenterHead.EnableObject (0, ExitWarp); // BackgroundSpin.SetActive (false); CenterHead.DisableObject(0, ExitWarp); BackgroundSpin.GetComponent <NewObjectSpawner> ().FadeObject(0, BackgroundSpin, 1); MusicController.control.FadeMusic(); }
IEnumerator C_StartCoroutine() { yield return(new WaitForSeconds(StartDelay)); // if (NumberOfSets == 0) // NumberOfSets = 1000; int I = 0; // for(int I=0; I<NumberOfSets; I++) while (I < NumberOfSets || NumberOfSets == 0) { if (ShootDirection) { SuperScript.ShootDirection(0, ObjectAmount, Target, ObjectDelay, ObjectSpeed); } if (ShootAtPlayer) { SuperScript.ShootAtTarget_Player(0, ObjectDelay, ObjectAmount, ObjectSpeed); } if (WaveyLine) { if (Xdirection != 0) { SuperScript.WaveSpray_Horizontal(0, ObjectAmount, ObjectDelay, Amplitude_Y, PeriodSpeed_Y, ObjectSpeed); } if (Ydirection != 0) { SuperScript.WaveSpray_Vertical(0, ObjectAmount, ObjectDelay, Amplitude_X, PeriodSpeed_X, ObjectSpeed); } } if (SprayInDirection) { SuperScript.SprayInDirection(0, ObjectAmount, Target, ObjectDelay, ObjectSpeed); } if (RandomSprayOutwards) { SuperScript.RandomSprayOutwards(0, ObjectDelay, ObjectAmount, ObjectSpeed); } // Next 3 count as one object if (CircleBurst) { SuperScript.CircleBurst(0, ObjectAmount, ObjectSpeed); } if (RandomRain) { SuperScript.ShootFromTopScreen(0, ObjectAmount, ObjectDelay, ObjectSpeed); } if (FollowTarget) { SuperScript.FollowTarget_Player(0, DeathTimer, ObjectSpeed); } if (RandomSprayBounce) { SuperScript.RandomSprayBounce(0, ObjectDelay, ObjectAmount, ObjectSpeed); } yield return(new WaitForSeconds(TimeToSpawnObjects)); yield return(new WaitForSeconds(DelayBetweenSets)); I++; } print(" I AM DONE"); yield return(null); }