// Both paws go together and create random spray of objects IEnumerator C_PawCombine(float StartDelay) { yield return(new WaitForSeconds(StartDelay)); if (LeftArm.gameObject.activeInHierarchy) { LeftArm.SetDeathTimer(0, 5); LeftArm.MoveToPosition_X(0, gameObject.transform, 1); LeftArm.RandomSprayOutwards(2, 0.1f, 50, 1f); LeftArm.MoveObjectToPoint(8, LeftArmStartingPosition, 1); } if (RightArm.gameObject.activeInHierarchy) { RightArm.SetDeathTimer(0, 5); RightArm.MoveToPosition_X(0, gameObject.transform, 1); RightArm.RandomSprayOutwards(2, 0.1f, 50, 1.1f); RightArm.MoveObjectToPoint(8, RightArmStartingPosition, 1); } for (float I = 2; I < 7; I = I + 0.1f) { 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); }