Major scripting update🕹

- Added Input wren module
- Added Math wren module
- Added Entity wren module
- Changed camera API
This commit is contained in:
Antoine Pilote
2021-06-10 22:23:53 -04:00
parent 41742ce0ad
commit 855bb1edd6
15 changed files with 473 additions and 43 deletions

View File

@@ -11,10 +11,6 @@ namespace ScriptAPI
class EngineModule : public ScriptModule
{
std::string ModuleName = "Engine";
std::string WrenAPI = "class Engine { \n"
"foreign static Log(msg) \n"
"}"
"";
std::string GetModuleName() override
{
@@ -24,7 +20,6 @@ namespace ScriptAPI
void RegisterModule(WrenVM* vm) override
{
RegisterMethod("Log(_)", (void*)Log);
WrenInterpretResult result = wrenInterpret(vm, "main", WrenAPI.c_str());
}
static void Log(WrenVM* vm)
@@ -33,6 +28,4 @@ namespace ScriptAPI
Logger::Log(msg);
}
};
}