예제 #1
0
        void Update()
        {
            mCountdownToNextInstruction.Update(Time.deltaTime, true);
            mAutoAdvanceCountdown.Update(Time.deltaTime, false);
            mLevelTime.Update(Time.deltaTime, false);
            mDisplayedScore.PullTowards(mScore, Time.deltaTime);
            mMessageCd.Update(Time.deltaTime, true);
            mComboCd.Update(Time.deltaTime, true);
            mGameplaySecondCd.Update(Time.deltaTime, false);

            if (!mLevelTime.Expired && !mCountdownToNextInstruction.Active &&
                mScriptIp < mScript.Count)
            {
                ExecuteNextInstruction();
            }

            if (!mComboCd.Active)
            {
                mCombo = 0;
            }

            if (mGameplaySecondCd.Expired)
            {
                IncrementGameplayTimeAchievements((int)mGameplaySecondCd.Initial);
                mGameplaySecondCd.Start();
            }

            CheckAutoAdvance();
            CheckLevelCleared();
        }
예제 #2
0
    void MovePlayer()
    {
        if (Input.touchCount > 0)
        {
            ProcessTouchSteer(Input.touches);
        }
        else
        {
            mTargetY = mTargetY + GameConsts.MaxPlayerYSpeed *
                       Input.GetAxis("Vertical") * Time.deltaTime;
        }
        mTargetY = Util.Clamp(mTargetY, GameConsts.PlayerMinY, GameConsts.PlayerMaxY);
        mPlayerY.PullTowards(mTargetY, Time.deltaTime);
        float diff = mPlayerY.Value - gameObject.transform.position.y;

        gameObject.transform.Translate(0.0f, diff, 0.0f, Space.World);
    }