public void DeactivateSpawns() { isActive = false; gameController.LoadPuppets(new GameObject[gameController.activePlayers.Length]); for (int i = 0; i < spawns.Count; i++) { spawns[i].Deactivate(); } StartCoroutine(AudioFading.FadeOut(bgm, 0.5f)); }
public void NextScene() { gameInProgress = false; iTween.Stop(bgCylinder); for (int i = 0; i < transform.childCount; i++) { Transform child = transform.GetChild(i); if (child.gameObject.activeInHierarchy) { child.SendMessage("Vanish"); } } switch (sceneID) { case -2: iTween.RotateBy(bgCylinder, iTween.Hash("amount", new Vector3(0, 0.08f, 0), "time", 3, "easetype", iTween.EaseType.easeInOutSine, "looptype", iTween.LoopType.pingPong)); break; case -1: for (int i = 0; i < rotatingControllers.Length; i++) { rotatingControllers[i].Hide(); } StartCoroutine(playTransitionVideo(Color.black, 0)); StartCoroutine(AudioFading.FadeOut(bgm, 0.5f)); break; case 0: StartCoroutine(LoadFaceWashing()); break; case 1: faceWashingScene.DeactivateSpawns(); StartCoroutine(playTransitionVideo(Color.black, 1)); break; case 2: StartCoroutine(LoadBubbleTeaDrinking()); break; case 3: bubbleTeaDrinkingScene.DeactivateSpawns(); StartCoroutine(playTransitionVideo(Color.black, 2)); break; case 4: StartCoroutine(LoadHazeFanning()); break; case 5: hazeFanningScene.DeactivateSpawns(); StartCoroutine(playTransitionVideo(Color.white, 3)); break; case 6: StartCoroutine(LoadWinner()); break; case 7: StartCoroutine(playTransitionVideo(Color.black, 4)); iTween.RotateBy(videoPlane, iTween.Hash("z", 1f, "time", 120, "easetype", iTween.EaseType.linear, "looptype", iTween.LoopType.loop)); break; } sceneID++; }