void Start() { mode = _mode_.FIn_goT; movie.isLooping = false; title.isLooping = true; BlackPlane.color = Color.black; }
void Update() { if (SETIME) { return; } else { if (mode == _mode_.FOut_goM || mode == _mode_.FOut_goT) { BlackPlane.color += new Color(0, 0, 0, Time.deltaTime); if (BlackPlane.color.a >= 1) { if (mode == _mode_.FOut_goM) { title.Stop(); mode = _mode_.FIn_goM; } if (mode == _mode_.FOut_goT) { movie.Stop(); mode = _mode_.FIn_goT; } } } else if (mode == _mode_.FIn_goM || mode == _mode_.FIn_goT) { BlackPlane.color -= new Color(0, 0, 0, Time.deltaTime); if (BlackPlane.color.a <= 0) { if (mode == _mode_.FIn_goM) { movie.Play(); mode = _mode_.Movie; } if (mode == _mode_.FIn_goT) { title.Play(); mode = _mode_.Title; } } } else if (mode == _mode_.Movie) { cntT += Time.deltaTime; if (cntT > 1) { if (!movie.isPlaying || Key.A.Down || Key.B.Down || Key.X.Down || Key.Y.Down) { cntT = 0; mode = _mode_.FOut_goT; } } } else { cntT += Time.deltaTime; if (cntT > 20) { cntT = 0; mode = _mode_.FOut_goM; } if (Key.A.Down || Key.B.Down || Key.X.Down || Key.Y.Down) { SETIME = true; se.Play(); SceneLoader.Load("SelectScene"); Invoke("Next", 2); cntT = 0; BlackPlane.color = Color.clear; } } } }