//--------------------------------------------------------------------- public EntityGenerator buildGenerator(EntityGeneratorData generator_data, List<string> server_param, RouteObjectMgr route_object_mgr) { string type_name = generator_data.GetType().ToString(); if (mDicGeneratorFactory.ContainsKey(type_name)) { return mDicGeneratorFactory[type_name].buildGenerator(generator_data, server_param, route_object_mgr); } else { EbLog.Error(@"BaseFishLordMgr::buildGenerator::error::there are no " + type_name + " factory"); return null; } }
//--------------------------------------------------------------------- public EntityGenerator buildGenerator(EntityGeneratorData generator_data, List <string> server_param, RouteObjectMgr route_object_mgr) { string type_name = generator_data.GetType().ToString(); if (mDicGeneratorFactory.ContainsKey(type_name)) { return(mDicGeneratorFactory[type_name].buildGenerator(generator_data, server_param, route_object_mgr)); } else { EbLog.Error(@"BaseFishLordMgr::buildGenerator::error::there are no " + type_name + " factory"); return(null); } }
//--------------------------------------------------------------------- public ParticleSystemDataPrototype(List <JsonPacket> json_packet_list, ParticleSystemFactory factory) { mParticleSystemFactory = factory; foreach (var json_packet in json_packet_list) { // 根据Json字符串来生成BaseFishLordData BaseFishLordDataJson fish_lord_json = BaseJsonSerializer.deserialize <BaseFishLordDataJson>(json_packet.JsonString); EntityParticleSystemData fish_lord = new EntityParticleSystemData(); // 根据Json字符串来生成 fish_lord.mFishLordCommonData = BaseJsonSerializer.deserialize <FishLordCommonData> (fish_lord_json.mFishLordCommonDataString); // 根据Json字符串来生成BaseGeneratorData foreach (var it in fish_lord_json.mListBaseGenerator) { EntityGeneratorData generator_data = mParticleSystemFactory.buildGeneratorData(it); if (generator_data == null) { continue; } fish_lord.mListBaseGenerator.Add(generator_data); } // 根据Json字符串来生成BaseAffectorData foreach (var it in fish_lord_json.mListBaseAffector) { EntityAffectorData affector_data = mParticleSystemFactory.buildAffectorData(it); if (affector_data == null) { continue; } fish_lord.mListBaseAffector.Add(affector_data); } // 读出特效发射器和影响器的映射表。 fish_lord.mGeneratorAffectorMap = BaseJsonSerializer.deserialize <List <GeneratorAffectorkeyValuePair> > (fish_lord_json.mGeneratorAffectorMapString); mDicBaseFishLordDataPrototype.Add(json_packet.FileName.Substring(json_packet.FileName.LastIndexOf("/") + 1), fish_lord); } }
//--------------------------------------------------------------------- public override EntityGenerator buildGenerator(EntityGeneratorData generator_data, List <string> server_param, RouteObjectMgr route_object_mgr) { return(new RedFishGenerator((RedFishGeneratorData)generator_data, server_param, route_object_mgr)); }
public abstract EntityGenerator buildGenerator(EntityGeneratorData generator_data, List<string> server_param, RouteObjectMgr route_object_mgr);
public abstract EntityGenerator buildGenerator(EntityGeneratorData generator_data, List <string> server_param, RouteObjectMgr route_object_mgr);
//--------------------------------------------------------------------- public EntityGenerator buildGenerator(EntityGeneratorData generator_data, List <string> server_param, RouteObjectMgr route_object_mgr) { return(mParticleSystemFactory.buildGenerator(generator_data, server_param, route_object_mgr)); }
//--------------------------------------------------------------------- public EntityGenerator buildGenerator(EntityGeneratorData generator_data, List<string> server_param, RouteObjectMgr route_object_mgr) { return mParticleSystemFactory.buildGenerator(generator_data, server_param, route_object_mgr); }