IEnumerator WaitForCinematicCamera(float delay) { yield return new WaitForSeconds(delay); dCin -= levelCinematic.Cinematic; player1.GetComponent<Player>().SetPlayerControl(true); player2.GetComponent<Player>().SetPlayerControl(true); player1.transform.rotation = Quaternion.identity; player2.transform.rotation = Quaternion.identity; player1.GetComponent<Player>().CreateSpawnAnim(); player2.GetComponent<Player>().CreateSpawnAnim(); }
public void PlayOutro() { if (levelCinematic != null && levelCinematic.stepsOutro.Count > 0) { //player control handled by gamecontroller topB.gameObject.SetActive(false); downB.gameObject.SetActive(false); rightB.gameObject.SetActive(false); leftB.gameObject.SetActive(false); levelCinematic.Reset(); dCin += levelCinematic.Cinematic; currrentCinematicType = Cinematic_Type.OUTRO; } }
// Use this for initialization void Start() { if (levelCinematic != null && levelCinematic.stepsIntro.Count > 0) { player1.GetComponent<Player>().SetPlayerControl(false); player2.GetComponent<Player>().SetPlayerControl(false); dCin += levelCinematic.Cinematic; currrentCinematicType = Cinematic_Type.INTRO; StartCoroutine(WaitForCinematicCamera(levelCinematic.GetDuration(Cinematic_Type.INTRO))); } }