Framebuffer resize queued to next frame to fix flickering Wren VM init moved to on play event Added new Wren modules Added missing components to the editor Changed how the wren scripts gets initialized
27 lines
613 B
C++
27 lines
613 B
C++
#pragma once
|
|
#include "ScriptingEngine.h"
|
|
#include <map>
|
|
#include <string>
|
|
|
|
class WrenHandle;
|
|
class WrenScript
|
|
{
|
|
public:
|
|
std::map <std::string, WrenHandle*> methods;
|
|
WrenHandle* m_Instance;
|
|
WrenHandle* m_OnInitHandle;
|
|
WrenHandle* m_OnUpdateHandle;
|
|
WrenHandle* m_OnExitHandle;
|
|
WrenHandle* m_SetEntityIDHandle;
|
|
|
|
WrenScript(const std::string& path, const std::string& mod, bool isEntity = false);
|
|
|
|
void CallInit();
|
|
void CallUpdate(float timestep);
|
|
void CallExit();
|
|
|
|
void RegisterMethod(const std::string& signature);
|
|
void CallMethod(const std::string& signature);
|
|
|
|
void SetScriptableEntityID(int id);
|
|
}; |