//--------------------------------------------------------------------- void _updateDieAnimation(float elapsed_tm) { if (mIsDieAnimation) { mCount -= elapsed_tm; if (mCount <= 0) { _signDestroy(); } return; } if (mMassEntity == null) { mIsDieAnimation = true; return; } mMassEntity.update(elapsed_tm); setPosition(mMassEntity.Position, mRenderFish.getFishAngle()); if (mMassEntity.IsEndRoute && !mIsDieAnimation) { setScale(mScale * (float)mVibFishData.FishHeight / (float)mVibFishData.FishPixelHeight); playAnimation(mVibFishData.FishAnimDie); mIsDieAnimation = true; } }
//------------------------------------------------------------------------- public void fishDie() { List <StillParticle> particle_list = _loopBuildParticle(TbDataFish.ParticleProduceTimeEnum.FishDie); float angle = mCRenderFish.getFishAngle(); mISpriteFish.setDirection(0); foreach (var it in particle_list) { it.transform.parent = mISpriteFish.FishGameObject.transform; it.transform.localPosition = Vector3.zero; } mISpriteFish.setDirection(angle); }