//--------------------------------------------------------------------- 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); }
//--------------------------------------------------------------------- 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); } }
public override EntityGeneratorData buildGeneratorData(JsonItem json_item) { return(BaseJsonSerializer.deserialize <FixGeneratorData>(json_item.mJsonString)); }
public abstract EntityAffectorData buildAffectorData(JsonItem json_item);
public override EntityAffectorData buildAffectorData(JsonItem json_item) { return(BaseJsonSerializer.deserialize <AngleSpeedAffectorData>(json_item.mJsonString)); }
public abstract EntityGeneratorData buildGeneratorData(JsonItem json_item);