Esempio n. 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;
             }
         }
     }
 }
Esempio n. 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);
 }
Esempio n. 3
0
 //-------------------------------------------------------------------------
 public void setPosition(EbVector3 position, float angle)
 {
     mCSpriteNumber.setPosition(position, angle);
     mNumberBackgroundCSprite.setPosition(position);
     mNumberBackgroundCSprite.setDirection(angle);
 }
Esempio n. 4
0
 //-------------------------------------------------------------------------
 public void setDigitPosition(EbVector3 position, float up_angle)
 {
     mSpriteNumber.setPosition(position, up_angle);
 }