Core::Core(sf::RenderWindow* window) : _renderWindow(window) { GUIObject::window = window; _currentScene = 0; _deletedScene = 0; InitializeSubSystems(); SwitchScene(new ConnectScene()); }
bool NFCSceneAOIModule::RequestEnterScene(const NFGUID & self, const int nSceneID, const int nGrupID, const int nType, const NFDataList & argList) { if (nGrupID < 0) { return false; } const int nNowSceneID = m_pKernelModule->GetPropertyInt32(self, NFrame::Player::SceneID()); const int nNowGroupID = m_pKernelModule->GetPropertyInt32(self, NFrame::Player::GroupID()); if (nNowSceneID == nSceneID && nNowGroupID == nGrupID) { m_pLogModule->LogNormal(NFILogModule::NLL_INFO_NORMAL, self, "in same scene and group but it not a clone scene", nSceneID); return false; } NF_SHARE_PTR<NFCSceneInfo> pSceneInfo = GetElement(nSceneID); if (!pSceneInfo) { return false; } /* if (!pSceneInfo->ExistElement(nNewGroupID)) { return false; } */ int nEnterConditionCode = EnterSceneCondition(self, nSceneID, nGrupID, nType, argList); if (nEnterConditionCode != 0) { m_pLogModule->LogNormal(NFILogModule::NLL_INFO_NORMAL, self, "before enter condition code:", nEnterConditionCode); return false; } NFVector3 vRelivePos = GetRelivePosition(nSceneID, 0); if (!SwitchScene(self, nSceneID, nGrupID, nType, vRelivePos, 0.0f, argList)) { m_pLogModule->LogNormal(NFILogModule::NLL_INFO_NORMAL, self, "SwitchScene failed", nSceneID); return false; } return true; }
void LD32::StartGame() { SwitchScene(engine::Factory::create<Level>("assets/scripts/level_2.json", this)); }