First pass scriptable subsystems that has the same lifetime of the engine

This commit is contained in:
WiggleWizard
2024-09-18 12:44:46 +01:00
parent 67d7865a20
commit 510b577f49
17 changed files with 219 additions and 6 deletions

View File

@@ -324,6 +324,15 @@ 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);
@@ -525,6 +534,11 @@ namespace Nuake
}
}
}
for (auto& delegate : listenersGameAssemblyLoaded)
{
delegate();
}
}
}