//------------------------------------------------------------------------- public override void setPosition(EbVector3 position, float angle) { base.setPosition(position, angle); if (mSpriteFish != null) { mSpriteFish.setPosition(position, angle); } }
//------------------------------------------------------------------------- public void update(float elapsed_tm) { if (mISpriteFish == null) { return; } if (mIsDestroy) { return; } float update_delta_time = mSpriteFreeFromTimeFactor ? Time.deltaTime : elapsed_tm; mISpriteFish.update(update_delta_time); if (mMassEntity.IsOutScreen || mMassEntity.IsEndRoute) { mNotNeedDestroyParticle = true; signDestroy(); return; } if (mIsSurvivalTime) { mSurvivalTime -= update_delta_time; if (mSurvivalTime < 0) { signDestroy(); return; } } if (mFishStopMove) { return; } mMassEntity.update(update_delta_time); mISpriteFish.setPosition(mMassEntity.Position, mMassEntity.Angle); }