summaryrefslogtreecommitdiffstats
path: root/source/squirrelbindings/SquirrelObject.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/squirrelbindings/SquirrelObject.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/squirrelbindings/SquirrelObject.h b/source/squirrelbindings/SquirrelObject.h
index 1ac6fa105..547dd4e02 100644
--- a/source/squirrelbindings/SquirrelObject.h
+++ b/source/squirrelbindings/SquirrelObject.h
@@ -9,15 +9,20 @@ public:
m_SquirrelObject = a_Obj;
}
- Sqrat::Function GetFunction(const char *methodName)
+ Sqrat::Function GetFunction(const char *a_MethodName)
{
if(m_SquirrelObject.IsNull())
return Sqrat::Function();
- Sqrat::Function method(m_SquirrelObject, methodName);
+ Sqrat::Function method(m_SquirrelObject, a_MethodName);
return method;
}
+ bool HasFunction(const char *a_MethodName)
+ {
+ return !this->GetFunction(a_MethodName).IsNull();
+ }
+
protected:
Sqrat::Object m_SquirrelObject;