paul.w Posted March 13, 2014 Share Posted March 13, 2014 Hi 1) Scheduler can it be used without the Game Framework? 2) Are there any code examples ? Thanks Link to comment
ulf.schroeter Posted March 13, 2014 Share 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. Link to comment
paul.w Posted March 17, 2014 Author Share Posted March 17, 2014 Thanks Ulf :) you're a great help :) Link to comment
unclebob Posted March 21, 2014 Share 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 Link to comment
paul.w Posted March 21, 2014 Author Share Posted March 21, 2014 Thanks :) great help :) Link to comment
Recommended Posts