//--------------------------------------------------------------------- void _initDieRoute() { mMassEntity = new MassEntity(); RouteParaCurve route = new RouteParaCurve(); route.create(mRenderFish.Position, 0, 0.6f, mRenderFish.jumpDistance()); mMassEntity.setRoute(route); }
//------------------------------------------------------------------------- public void dieByFullBomb(EbVector3 dest_pos) { if (mIsDie) { return; } mNotNeedDestroyParticle = true; mISpriteFish.setTrigger(false); mISpriteFish.playRotationAnimation(); mSpriteFreeFromTimeFactor = true; mMassEntity.setRoute(RouteHelper.buildLineRoute(mMassEntity.Position, dest_pos)); float speed = mMassEntity.Position.getDistance(dest_pos) / mSecondsSinceFullScreenBomb; mMassEntity.setSpeed(speed); setSurvivalTime(mSecondsSinceFullScreenBomb); signDie(); }
//------------------------------------------------------------------------- public void addRoute(IRoute route) { mMassEntity.setRoute(route); }