Beispiel #1
0
 //-------------------------------------------------------------------------
 public void update(float elapsed_tm)
 {
     if (mIsNeedAutoDestroy)
     {
         mTimeCounter += elapsed_tm;
         if (mTimeCounter >= mFunDelayTime)
         {
             remove(this);
         }
         else if (mNeedFadeout)
         {
             mAlpha -= elapsed_tm / mFadeoutFunDelayTime;
             mCSpriteNumber.setAlpha(mAlpha);
         }
         else
         {
             mMassEntity.update(elapsed_tm);
             mCSpriteNumber.setPosition(mMassEntity.Position, 0);
             if (mMassEntity.IsEndRoute)
             {
                 mNeedFadeout = true;
             }
         }
     }
 }
Beispiel #2
0
 //---------------------------------------------------------------------
 void updateRotate(float elapsed_tm)
 {
     if (mRoteteRight)
     {
         mCurrentAngle += mRotateSpeed * elapsed_tm;
         if (mCurrentAngle >= mMaxAngle)
         {
             mCurrentAngle = mMaxAngle;
             mRoteteRight  = !mRoteteRight;
         }
     }
     else
     {
         mCurrentAngle -= mRotateSpeed * elapsed_tm;
         if (mCurrentAngle <= -mMaxAngle)
         {
             mCurrentAngle = -mMaxAngle;
             mRoteteRight  = !mRoteteRight;
         }
     }
     mSpriteNumber.setPosition(mPosition, mAngle + mCurrentAngle);
 }
Beispiel #3
0
 //-------------------------------------------------------------------------
 public void setPosition(EbVector3 position, float angle)
 {
     mCSpriteNumber.setPosition(position, angle);
     mNumberBackgroundCSprite.setPosition(position);
     mNumberBackgroundCSprite.setDirection(angle);
 }
Beispiel #4
0
 //-------------------------------------------------------------------------
 public void setDigitPosition(EbVector3 position, float up_angle)
 {
     mSpriteNumber.setPosition(position, up_angle);
 }