Ejemplo n.º 1
0
        //---------------------------------------------------------------------
        public FishCollider newFishCollider(float center_x, float center_y, float width, float height, CLogicFish fish)
        {
            FishCollider collider = new FishCollider(center_x, center_y, width, height, fish);

            mTagColliderList.Add(collider);
            return(collider);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
        //-------------------------------------------------------------------------
        public void destroy()
        {
            if (mDestroy)
            {
                return;
            }
            mDestroy = true;
            TagColliderMgr collider_mgr = mScene.getColliderMgr();

            if (collider_mgr == null)
            {
                return;
            }
            collider_mgr.removeCollider(mFishCollider);
            mFishCollider = null;
        }
Ejemplo n.º 4
0
 //---------------------------------------------------------------------
 public FishCollider newFishCollider(float center_x, float center_y, float width, float height, CLogicFish fish)
 {
     FishCollider collider = new FishCollider(center_x, center_y, width, height, fish);
     mTagColliderList.Add(collider);
     return collider;
 }
Ejemplo n.º 5
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);
        }
Ejemplo n.º 6
0
 //-------------------------------------------------------------------------
 public void destroy()
 {
     if (mDestroy) return;
     mDestroy = true;
     TagColliderMgr collider_mgr = mScene.getColliderMgr();
     if (collider_mgr == null) return;
     collider_mgr.removeCollider(mFishCollider);
     mFishCollider = null;
 }