From b52920a35eb69d1a258c737e3114fbe5cfe9aca5 Mon Sep 17 00:00:00 2001 From: Andy Belle-Isle Date: Mon, 2 Sep 2019 01:42:36 -0400 Subject: Changed Lua Idle function names --- src/components/Script.hpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/components') diff --git a/src/components/Script.hpp b/src/components/Script.hpp index 069fea9..b3c89f3 100644 --- a/src/components/Script.hpp +++ b/src/components/Script.hpp @@ -42,16 +42,23 @@ public: return *this; } - void exec(void) { + void exec(void) + { if (caller["Idle"] == sol::type::function) caller["Idle"](caller); // Call idle function and pass itself // in or to fulfill the 'self' param } - void update(void) + void updatePhysics(void) + { + if (caller["PhysicsIdle"] == sol::type::function) + caller["PhysicsIdle"](caller); + } + + void updateRender(void) { - if (caller["Update"] == sol::type::function) - caller["Update"](caller); + if (caller["RenderIdle"] == sol::type::function) + caller["RenderIdle"](caller); } }; -- cgit v1.2.3