Exemple #1
0
 //---------------------------------------------------------------------
 public int getCountByGroup(TbDataOutFishGroup group)
 {
     if (mGroupKeyEntityGroup.ContainsKey(group))
     {
         return(mGroupKeyEntityGroup[group].Count);
     }
     return(0);
 }
Exemple #2
0
        //---------------------------------------------------------------------
        public void removeEntity(BaseEntity entity)
        {
            if (mVibKeyBaseEntity.ContainsKey(entity.FishVibId))
            {
                mVibKeyBaseEntity[entity.FishVibId].Remove(entity);
            }
            mFishObjKeyBaseEntityObjId.Remove(entity.FishObjId);
            mListBaseEntity.Remove(entity);

            TbDataOutFishGroup group_key = EbDataMgr.Instance.getData <TbDataFish>(entity.FishVibId).dataOutFishGroup;

            if (mGroupKeyEntityGroup.ContainsKey(group_key))
            {
                mGroupKeyEntityGroup[group_key].Remove(entity);
            }
        }
Exemple #3
0
        Dictionary <TbDataOutFishGroup, List <BaseEntity> > mGroupKeyEntityGroup = new Dictionary <TbDataOutFishGroup, List <BaseEntity> >(); //key:TbDataOutFishGroup

        //---------------------------------------------------------------------
        public void addEntity(BaseEntity entity)
        {
            if (!mVibKeyBaseEntity.ContainsKey(entity.FishVibId))
            {
                mVibKeyBaseEntity.Add(entity.FishVibId, new List <BaseEntity>());
            }
            mVibKeyBaseEntity[entity.FishVibId].Add(entity);
            mFishObjKeyBaseEntityObjId.Add(entity.FishObjId, entity);
            mListBaseEntity.Add(entity);

            TbDataOutFishGroup group_key = EbDataMgr.Instance.getData <TbDataFish>(entity.FishVibId).dataOutFishGroup;

            if (!mGroupKeyEntityGroup.ContainsKey(group_key))
            {
                mGroupKeyEntityGroup.Add(group_key, new List <BaseEntity>());
            }
            mGroupKeyEntityGroup[group_key].Add(entity);
        }
Exemple #4
0
 //---------------------------------------------------------------------
 public int getCountByGroup(TbDataOutFishGroup group)
 {
     return(mBaseEntityTable.getCountByGroup(group));
 }