示例#1
0
    // Update is called once per frame
    void Update()
    {
        //ensure game is the first instance in scane, and call this at the begin of update
        TimeHelper.SynchronizeTimestampScaled();

        if (_state == STATE.UI)
        {
            TimeHelper.SetTimeScale(1);
        }
        else
        {
            TimeHelper.SetTimeScale(_battleSpeed);
        }

        //
        if (!_isPause)
        {
            _mouseStatus.Update();

            switch (state)
            {
            case STATE.INIT:
                UpdateInit();
                break;

            case STATE.ENTERING:
                UpdateEntering();
                break;

            case STATE.BATTLE:
                UpdateBattle();
                break;


            case STATE.OVER:
                UpdateOver();
                break;
            }

            _mouseContorl.Update();
            _mapCamera.Update();
            _mapGrid.UpdateShowTile();
            _gameSkillControl.Update();

            SychronizeBattleProgress();

            ++_gameTick;
        }
    }
示例#2
0
 public void Update()
 {
     currentCamera.Update();
 }