예제 #1
0
        //---------------------------------------------------------------------
        public BaseFishLordDataJson getJson()
        {
            BaseFishLordDataJson json_data = new BaseFishLordDataJson();

            json_data.mFishLordCommonDataString = BaseJsonSerializer.serialize(mFishLordCommonData);

            foreach (var it in mListBaseGenerator)
            {
                JsonItem json_item = new JsonItem();
                json_item.mTypeName   = it.GetType().ToString();
                json_item.mJsonString = BaseJsonSerializer.serialize(it);
                json_data.mListBaseGenerator.Add(json_item);
            }

            foreach (var it in mListBaseAffector)
            {
                JsonItem json_item = new JsonItem();
                json_item.mTypeName   = it.GetType().ToString();
                json_item.mJsonString = BaseJsonSerializer.serialize(it);
                json_data.mListBaseAffector.Add(json_item);
            }

            json_data.mGeneratorAffectorMapString = BaseJsonSerializer.serialize(mGeneratorAffectorMap);

            return(json_data);
        }
예제 #2
0
 //---------------------------------------------------------------------
 public EntityAffectorData buildAffectorData(JsonItem json_item)
 {
     if (mDicAffectorFactory.ContainsKey(json_item.mTypeName))
     {
         return(mDicAffectorFactory[json_item.mTypeName].buildAffectorData(json_item));
     }
     else
     {
         EbLog.Error(@"BaseFishLordMgr::buildAffectorData::error::there are no " + json_item.mTypeName + " factory");
         return(null);
     }
 }
예제 #3
0
 public override EntityGeneratorData buildGeneratorData(JsonItem json_item)
 {
     return(BaseJsonSerializer.deserialize <FixGeneratorData>(json_item.mJsonString));
 }
예제 #4
0
 public abstract EntityAffectorData buildAffectorData(JsonItem json_item);
예제 #5
0
 public override EntityAffectorData buildAffectorData(JsonItem json_item)
 {
     return(BaseJsonSerializer.deserialize <AngleSpeedAffectorData>(json_item.mJsonString));
 }
예제 #6
0
 public abstract EntityGeneratorData buildGeneratorData(JsonItem json_item);