//--------------------------------------------------------------------- void _removeDestroyedCollider() { while (mQueTagColliderDestroy.Count > 0) { TagCollider c = mQueTagColliderDestroy.Dequeue(); mTagColliderList.Remove(c); } }
//--------------------------------------------------------------------- public void removeCollider(TagCollider collider) { if (collider == null) { return; } mQueTagColliderDestroy.Enqueue(collider); }
//--------------------------------------------------------------------- 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); } }
//------------------------------------------------------------------------- void onCollision(TagCollider other) { CLogicFish fish = ((FishCollider)other).LogicFish; if (fish == null) { return; } if (!isTargetFish(fish)) { return; } mScene.getLevel().c2sFishHit(mPlayerId, mBulletObjId, fish.FishObjId);// 暂时关闭 }