void Update() { step_timer += Time.deltaTime; if (step_timer > 120.0f) // 5秒たったら { c03_Score.Reset_score(); // スコアをクリア. Application.LoadLevel(0); // タイトルシーンに移動. } }
void Update() { if (gameClear) { if (Input.GetMouseButtonDown(0)) { stage_no++; if (stage_no < 3) { Application.LoadLevel(stage_no); } else { Application.LoadLevel("ending"); } } return; // フラグが立っている時、Update()関数を強制終了。 } if (gameOver) { if (Input.GetMouseButtonDown(0)) { stage_no = 1; // ステージNoの初期化. c03_Score.Reset_score(); // スコアの初期化. Application.LoadLevel(0); // タイトルへ. } return; // フラグが立っている時、Update()関数を強制終了。 } spd_timer += Time.deltaTime; // 時間経過で値を増やしていく. if (spd_timer > 1.0f) // 1秒以上なら. { c11_Ball.spdUp(); // ボールの速度アップ spd_timer = 0.0f; // 時間初期化. } }