Completed work on exposing subsystems to scene events

This commit is contained in:
WiggleWizard
2024-09-19 21:43:04 +01:00
parent edce52bb17
commit a487d31c48
9 changed files with 134 additions and 55 deletions

View File

@@ -203,6 +203,8 @@ namespace Nuake
managedObject.Destroy();
}
onUninitializeDelegate.Broadcast();
Coral::GC::Collect();
Coral::GC::WaitForPendingFinalizers();
@@ -331,15 +333,6 @@ namespace Nuake
return widgetUUIDToManagedObjects[std::make_pair(canvasUUID, uuid)];
}
template<class T>
void ScriptingEngineNet::AddListener(const T& delegate) {}
template <>
void ScriptingEngineNet::AddListener<ScriptingEngineNet::GameAssemblyLoadedDelegate>(const GameAssemblyLoadedDelegate& delegate)
{
listenersGameAssemblyLoaded.push_back(delegate);
}
std::vector<CompilationError> ScriptingEngineNet::BuildProjectAssembly(Ref<Project> project)
{
const std::string sanitizedProjectName = String::Sanitize(project->Name);
@@ -541,10 +534,7 @@ namespace Nuake
}
}
for (auto& delegate : listenersGameAssemblyLoaded)
{
delegate();
}
onGameAssemblyLoadedDelegate.Broadcast();
}
}