timer fixes: timers managed by engine can run in the background. Closes #180
This commit is contained in:
parent
2c20455003
commit
b0b17f4633
4 changed files with 57 additions and 22 deletions
|
|
@ -4,9 +4,9 @@
|
|||
#include "McRFPy_API.h"
|
||||
#include "GameEngine.h"
|
||||
|
||||
Timer::Timer(PyObject* _target, int _interval, int now, bool _once, bool _start)
|
||||
Timer::Timer(PyObject* _target, int _interval, int now, bool _once, bool _start, const std::string& _name)
|
||||
: callback(std::make_shared<PyCallable>(_target)), interval(_interval), last_ran(now),
|
||||
paused(false), pause_start_time(0), total_paused_time(0), once(_once), stopped(!_start)
|
||||
paused(false), pause_start_time(0), total_paused_time(0), once(_once), stopped(!_start), name(_name)
|
||||
{}
|
||||
|
||||
Timer::Timer()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue