Beispiel #1
0
    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);
        }
    }
Beispiel #2
0
    void Update()
    {
        float delta = Time.deltaTime;

        if (isGameStart)
        {
            if (Time.time - lastSignTime > tickTime)
            {
                env.OnTick();
                lastSignTime = Time.time;
            }
        }
        env.OnUpdate(delta);
        pillMgr.Update(delta);
    }