Implemented a custom physics engine #316
|
@ -38,8 +38,8 @@ namespace SHADE
|
||||||
|
|
||||||
eventFunctions[0] = { &SHPhysicsSystem::onComponentAdded , SH_COMPONENT_ADDED_EVENT };
|
eventFunctions[0] = { &SHPhysicsSystem::onComponentAdded , SH_COMPONENT_ADDED_EVENT };
|
||||||
eventFunctions[1] = { &SHPhysicsSystem::onComponentRemoved, SH_COMPONENT_REMOVED_EVENT };
|
eventFunctions[1] = { &SHPhysicsSystem::onComponentRemoved, SH_COMPONENT_REMOVED_EVENT };
|
||||||
eventFunctions[2] = { &SHPhysicsSystem::onSceneInit , SH_SCENE_ON_INIT_EVENT };
|
eventFunctions[2] = { &SHPhysicsSystem::onSceneInit , SH_SCENE_INIT_POST };
|
||||||
eventFunctions[3] = { &SHPhysicsSystem::onSceneExit , SH_SCENE_ON_EXIT_EVENT };
|
eventFunctions[3] = { &SHPhysicsSystem::onSceneExit , SH_SCENE_EXIT_POST };
|
||||||
|
|
||||||
#ifdef SHEDITOR
|
#ifdef SHEDITOR
|
||||||
eventFunctions[4] = { &SHPhysicsSystem::onEditorPlay , SH_EDITOR_ON_PLAY_EVENT };
|
eventFunctions[4] = { &SHPhysicsSystem::onEditorPlay , SH_EDITOR_ON_PLAY_EVENT };
|
||||||
|
|
|
@ -62,8 +62,6 @@ namespace SHADE
|
||||||
SHEventManager::BroadcastEvent<SHSceneInitExitEvent>(exitEvent, SH_SCENE_EXIT_PRE);
|
SHEventManager::BroadcastEvent<SHSceneInitExitEvent>(exitEvent, SH_SCENE_EXIT_PRE);
|
||||||
|
|
||||||
currentScene->Free();
|
currentScene->Free();
|
||||||
SHEventManager::BroadcastEvent<SHSceneExitEvent>(SHSceneExitEvent{ currentSceneID }, SH_SCENE_ON_EXIT_EVENT);
|
|
||||||
|
|
||||||
currentScene->Unload();
|
currentScene->Unload();
|
||||||
SHEntityManager::DestroyAllEntity();
|
SHEntityManager::DestroyAllEntity();
|
||||||
|
|
||||||
|
@ -112,8 +110,6 @@ namespace SHADE
|
||||||
SHEventManager::BroadcastEvent<SHSceneInitExitEvent>(exitEvent, SH_SCENE_EXIT_PRE);
|
SHEventManager::BroadcastEvent<SHSceneInitExitEvent>(exitEvent, SH_SCENE_EXIT_PRE);
|
||||||
|
|
||||||
currentScene->Free();
|
currentScene->Free();
|
||||||
SHEventManager::BroadcastEvent<SHSceneExitEvent>(SHSceneExitEvent{ currentSceneID }, SH_SCENE_ON_EXIT_EVENT);
|
|
||||||
|
|
||||||
if (cleanReload == true)
|
if (cleanReload == true)
|
||||||
{
|
{
|
||||||
cleanReload = false;
|
cleanReload = false;
|
||||||
|
|
Loading…
Reference in New Issue