paul.w Posted March 13, 2014 Posted March 13, 2014 Hi 1) Scheduler can it be used without the Game Framework? 2) Are there any code examples ? Thanks
ulf.schroeter Posted March 13, 2014 Posted March 13, 2014 The game framework is normal UNIGINE script code. Therefore you can easily extract the relevant code and convert it to a stand-alone version.
unclebob Posted March 21, 2014 Posted March 21, 2014 Hi Paul! I've made a test sample with scheduler for you which you can find in the attachments. All you need to do is to include scheduler header and initialize it properly like in this code: #include <core/unigine.h> #include <framework/game/scheduler.h> Game::Scheduler scheduler; /* */ int init() { scheduler = new Game::Scheduler(); scheduler.setPeriodicUpdate(NULL,"func",1,1); return 1; } /* */ int shutdown() { delete scheduler; return 1; } /* */ int update() { float ifps = engine.game.getIFps(); scheduler.update(ifps); return 1; } /* */ int func() { log.message("Hi from scheduler!\n"); } test_scheduler.zip
Recommended Posts