diff options
Diffstat (limited to 'source/squirrelbindings/SquirrelObject.h')
-rw-r--r-- | source/squirrelbindings/SquirrelObject.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source/squirrelbindings/SquirrelObject.h b/source/squirrelbindings/SquirrelObject.h new file mode 100644 index 000000000..1ac6fa105 --- /dev/null +++ b/source/squirrelbindings/SquirrelObject.h @@ -0,0 +1,24 @@ +#pragma once
+#include <sqrat.h>
+
+class SquirrelObject
+{
+public:
+ SquirrelObject(Sqrat::Object a_Obj)
+ {
+ m_SquirrelObject = a_Obj;
+ }
+
+ Sqrat::Function GetFunction(const char *methodName)
+ {
+ if(m_SquirrelObject.IsNull())
+ return Sqrat::Function();
+
+ Sqrat::Function method(m_SquirrelObject, methodName);
+ return method;
+ }
+
+protected:
+ Sqrat::Object m_SquirrelObject;
+
+};
\ No newline at end of file |