private void Update() { if (inRound == 2 && currentRound == finalRound) { gameGUI.isOver = true; } else { if (actionManager.disk_number == 0 && inRound == 1 && !gameGUI.isOver) { inRound = 2; } if (actionManager.disk_number == 0 && inRound == 0 && !gameGUI.isOver) { currentRound++; actionManager.disk_number = (currentRound + 1) * diskNumber; Debug.Log("Controller's disk number:" + actionManager.disk_number); inRound = 1; } Debug.Log(actionManager.disk_number); if (time > roundTime) { if (actionManager.disk_number > 0) { DiskFactory df = Singleton <DiskFactory> .Instance; time = 0; actionManager.loadAction(df.GetOneDisk(currentRound)); } } else { time += Time.deltaTime; } } }