Ejemplo n.º 1
0
    public override void Update()
    {
        if (mManager.mZigManager.has_user() && mManager.mZigManager.is_skeleton_tracked_alternative())
        {
            CurrentPose = ProGrading.snap_pose(mManager);
        }
        else
        {
            CurrentPose = mManager.mReferences.mDefaultPose.to_pose();
        }

        if (GS == GameState.NORMAL)
        {
            if (KeyMan.GetKeyDown("Pause"))
            {
                if (!mModeNormalPlay.Paused)
                {
                    mManager.GameEventDistributor("PAUSE", null);
                }
                else
                {
                    mManager.GameEventDistributor("RESUME", null);
                }
            }
            if (!mModeNormalPlay.Paused)
            {
                mModeNormalPlay.update();
            }
        }
        else if (GS == GameState.TEST)
        {
            mModeTesting.update();
        }
        else if (GS == GameState.SIMIAN)
        {
            mModeSimian.update();
        }
        else if (GS == GameState.CHALLENGE)
        {
            mModeChallenge.update();
        }

        if (GS != GameState.SIMIAN)
        {
            //reader connected and no user
            if (!mManager.mZigManager.has_user() && mManager.mZigManager.is_reader_connected() == 2)
            {
                mIdleTimer.update(Time.deltaTime);
            }
            else
            {
                mIdleTimer.reset();
            }
            if (mIdleTimer.isExpired())
            {
                mIdleTimer.reset();
                mManager.restart_game();
            }
        }
    }
Ejemplo n.º 2
0
 //--------
 //related to updating play
 //--------
 //called by NewGameManager
 public void enable_warning_text(bool enable)
 {
     if (enable && mWarningTimer.isExpired())
     {
         mWarningTimer.reset();
     }
     mBBWarningText.HardColor = (((int)(Time.time * 8)) % 2 == 0) && enable ? new Color(0.75f, 0.05f, 0.0f, 0.5f) : new Color(0, 0, 0, 0);
 }
 public bool animate(FlatElementBase aElement, float aDeltaTime)
 {
     mTime.update(aDeltaTime);
     mChange(mTime.getLinear(), mFunction(mTime.getLinear()) * mForce, aElement);
     return(mTime.isExpired());
 }