Exemplo n.º 1
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);
        }
Exemplo n.º 2
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();
        }