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(); } } }
public bool animate(FlatElementBase aElement, float aDeltaTime) { mTime.update(aDeltaTime); mChange(mTime.getLinear(), mFunction(mTime.getLinear()) * mForce, aElement); return(mTime.isExpired()); }