Пример #1
0
 //---------------------------------------------------------------------
 void _removeDestroyedCollider()
 {
     while (mQueTagColliderDestroy.Count > 0)
     {
         TagCollider c = mQueTagColliderDestroy.Dequeue();
         mTagColliderList.Remove(c);
     }
 }
Пример #2
0
        //---------------------------------------------------------------------
        public void removeCollider(TagCollider collider)
        {
            if (collider == null)
            {
                return;
            }

            mQueTagColliderDestroy.Enqueue(collider);
        }
Пример #3
0
        //---------------------------------------------------------------------
        public void add(IPoint <RectArea> new_obj)
        {
            TagCollider tag_collider = (TagCollider)new_obj;

            if (tag_collider.Tag == 0)
            {
                mListFishCollider.Add((FishCollider)tag_collider);
            }
            else
            {
                mListBulletCollider.Add((BulletCollider)tag_collider);
            }
        }
Пример #4
0
        //-------------------------------------------------------------------------
        void onCollision(TagCollider other)
        {
            CLogicFish fish = ((FishCollider)other).LogicFish;

            if (fish == null)
            {
                return;
            }
            if (!isTargetFish(fish))
            {
                return;
            }
            mScene.getLevel().c2sFishHit(mPlayerId, mBulletObjId, fish.FishObjId);// 暂时关闭
        }