diff options
Diffstat (limited to 'src/script_system.cpp')
-rw-r--r-- | src/script_system.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/script_system.cpp b/src/script_system.cpp index 3293753..14d247e 100644 --- a/src/script_system.cpp +++ b/src/script_system.cpp | |||
@@ -190,6 +190,8 @@ ScriptSystem::ScriptSystem(Game& game) : game_(game) { | |||
190 | } | 190 | } |
191 | 191 | ||
192 | void ScriptSystem::tick(double dt) { | 192 | void ScriptSystem::tick(double dt) { |
193 | if (game_.isGameplayPaused()) return; | ||
194 | |||
193 | if (callable_ && *callable_) { | 195 | if (callable_ && *callable_) { |
194 | auto result = (*callable_)(dt); | 196 | auto result = (*callable_)(dt); |
195 | if (!result.valid()) { | 197 | if (!result.valid()) { |
@@ -228,3 +230,11 @@ void ScriptSystem::runScript(std::string mapName, std::string scriptName) { | |||
228 | runner_.reset(); | 230 | runner_.reset(); |
229 | } | 231 | } |
230 | } | 232 | } |
233 | |||
234 | void ScriptSystem::runDebugScript(std::string script) { | ||
235 | auto result = engine_.script(script); | ||
236 | if (!result.valid()) { | ||
237 | sol::error e = result; | ||
238 | std::cout << e.what() << std::endl; | ||
239 | } | ||
240 | } | ||