Example #1
0
        //-------------------------------------------------------------------------
        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();
        }
Example #2
0
        //-------------------------------------------------------------------------
        public void create(int fish_vibid, int fish_objid)
        {
            mFishData  = EbDataMgr.Instance.getData <TbDataFish>(fish_vibid);
            mFishObjId = fish_objid;
            mSpeed     = mFishData.getSpeed();

            mFishType = (TbDataFish.FishType)mFishData.Type;

            mMassEntity = new MassEntity();
            mMassEntity.setSpeed(mSpeed);

            mFishCollider = mScene.getColliderMgr().newFishCollider(0, 0, 80, 80, this);//读取vib配置

            update(0);
        }
Example #3
0
        //-------------------------------------------------------------------------
        public void create(int fish_vib_id, int fish_objid)
        {
            mVibFish   = EbDataMgr.Instance.getData <TbDataFish>(fish_vib_id);
            mFishObjId = fish_objid;

            mISpriteFish = mScene.getSpriteFishFactory().buildSpriteFish(this, fish_vib_id);

            mMassEntity = new MassEntity();
            mMassEntity.setSpeed(mVibFish.getSpeed());

            mISpriteFish.setDirection(0);

            mFishParticleMgr = new FishParticleMgr(mScene, this, fish_vib_id, mISpriteFish);
            mFishParticleMgr.fishBorn();
            mFishParticleMgr.fishMoving();
        }
Example #4
0
 //-------------------------------------------------------------------------
 public void setSpeed(float speed)
 {
     mMassEntity.setSpeed(speed);
 }