Implemented a custom physics engine #316

Merged
direnbharwani merged 95 commits from SHPhysics into main 2023-01-23 15:55:45 +08:00
2 changed files with 2 additions and 6 deletions
Showing only changes of commit 0cebedeee0 - Show all commits

View File

@ -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 };

View File

@ -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;