void Update() { if (roundHasStarted) { timeAfterRoundStart += Time.deltaTime; } if (roundHasStarted && checkAllUFOIsShot()) // 检查是否所有UFO都已经被击落 { print("All UFO is shot down! Next round in 3 sec"); roundHasStarted = false; Invoke("roundStart", 3); difficultyManager.setDifficultyByScore(scorer.getScore()); } else if (roundHasStarted && checkTimeOut()) // 检查这一轮是否已经超时 { print("Time out! Next round in 3 sec"); roundHasStarted = false; foreach (UFOController ufo in UFOfactory.getUsingList()) { actionManager.removeActionOf(ufo.getObj()); } UFOfactory.recycleAll(); Invoke("roundStart", 3); difficultyManager.setDifficultyByScore(scorer.getScore()); } }