void NFCActor::AddComponent(NF_SHARE_PTR<NFIComponent> pComponent) { mxComponent.AddElement(pComponent->GetComponentName(), pComponent); pComponent->SetActor(this); pComponent->Awake(); pComponent->Init(); pComponent->AfterInit(); pComponent->ReadyExecute(); }
bool NFCComponentManager::Init() { NF_SHARE_PTR<NFIComponent> pComponent = First(); while (nullptr != pComponent) { pComponent->Init(); pComponent = Next(); } return true; }
bool NFCItemConsumeManagerModule::Init() { ResgisterConsumeModule(NFMsg::EItemType::EIT_CARD, NF_SHARE_PTR<NFIItemConsumeProcessModule>(NF_NEW NFCItemCardConsumeProcessModule(pPluginManager))); ResgisterConsumeModule(NFMsg::EItemType::EIT_EQUIP, NF_SHARE_PTR<NFIItemConsumeProcessModule>(NF_NEW NFCItemEquipConsumeProcessModule(pPluginManager))); ResgisterConsumeModule(NFMsg::EItemType::EIT_GEM, NF_SHARE_PTR<NFIItemConsumeProcessModule>(NF_NEW NFCItemGemConsumeProcessModule(pPluginManager))); ResgisterConsumeModule(NFMsg::EItemType::EIT_TOKEN, NF_SHARE_PTR<NFIItemConsumeProcessModule>(NF_NEW NFCItemTokenConsumeProcessModule(pPluginManager))); ResgisterConsumeModule(NFMsg::EItemType::EIT_ITEM, NF_SHARE_PTR<NFIItemConsumeProcessModule>(NF_NEW NFCItemItemConsumeProcessModule(pPluginManager))); for (NF_SHARE_PTR<NFIItemConsumeProcessModule> xModule = First(); xModule != nullptr; xModule = Next()) { xModule->Init(); } return true; }
bool NFCSkillConsumeManagerModule::Init() { ResgisterConsumeModule(NFMsg::ESkillType::EST_BRIEF_SINGLE, NF_SHARE_PTR<NFISkillConsumeProcessModule>(NF_NEW NFCBriefSkillConsumeProcessModule(pPluginManager))); ResgisterConsumeModule(NFMsg::ESkillType::EST_BRIEF_GROUP, NF_SHARE_PTR<NFISkillConsumeProcessModule>(NF_NEW NFCBriefSkillConsumeProcessModule(pPluginManager))); ResgisterConsumeModule(NFMsg::ESkillType::EST_BULLET_SINGLE, NF_SHARE_PTR<NFISkillConsumeProcessModule>(NF_NEW NFCBulletSkillConsumeProcessModule(pPluginManager))); ResgisterConsumeModule(NFMsg::ESkillType::EST_BULLET_REBOUND, NF_SHARE_PTR<NFISkillConsumeProcessModule>(NF_NEW NFCBulletSkillConsumeProcessModule(pPluginManager))); ResgisterConsumeModule(NFMsg::ESkillType::EST_BULLET_BOMB, NF_SHARE_PTR<NFISkillConsumeProcessModule>(NF_NEW NFCBulletSkillConsumeProcessModule(pPluginManager))); for (NF_SHARE_PTR<NFISkillConsumeProcessModule> xModule = First(); xModule != nullptr; xModule = Next()) { xModule->Init(); } return true; }