void Update() { if (Input.GetKeyDown(KeyCode.Mouse0) || Input.GetKeyDown(KeyCode.Space)) { if (isWaiting || (isTrainning && isGameStart)) { env.exportQTable(); return; } if (!GameManager.S.isGameStart || IsGameOver) { GameControl(); } else { mainBird.FlyUp(); } } if (GameManager.S.isGameStart) { if (Time.time - lastSignTime > tickTime) { env.OnTick(); lastSignTime = Time.time; } Scorers.S.SetLiveTime(false); } }
void Update() { float delta = Time.deltaTime; if (isGameStart) { if (Time.time - lastSignTime > tickTime) { env.OnTick(); lastSignTime = Time.time; } } env.OnUpdate(delta); pillMgr.Update(delta); }