What about a method that gives access to the Timer
What about a method that gives access to the Timer
As it belongs to the device there's no easy way to do this.
-
LunarEffect
- Posts: 4
- Joined: Thu Feb 26, 2009 6:43 pm
maybe he means like videodriver is accesible in the gui env and the scenemanager?
Compete or join in irrlichts monthly screenshot competition!
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
-
LunarEffect
- Posts: 4
- Joined: Thu Feb 26, 2009 6:43 pm
CuteAlien wrote an extension/patch for multiple timers, if that's what you need you can find it here
You don't have access to the device when you create an entity using a factory i.e. one loaded in from xml.
So therefore you can't simply pass in a reference.
Oh and for singletons. I try to avoid them as they're effectively global variables and can cause unforseen problems (i.e. using it for your SceneManager), but for this case that's not the reason. I would simply never have access to it to create it in the first place as I'm writing a CustomSceneNode in IrrEdit without IrrEdit's source code so all I can "see" is the SceneManager.
Oh and I have 7 years experience in C++ and two published games under my belt for Namco and EA Halifax. Just out of curiosity, what's your resume?
btw - I got round the problem by using the same method in the example Animators by just doing:
However it just seemed a bit wasteful.
So therefore you can't simply pass in a reference.
Oh and for singletons. I try to avoid them as they're effectively global variables and can cause unforseen problems (i.e. using it for your SceneManager), but for this case that's not the reason. I would simply never have access to it to create it in the first place as I'm writing a CustomSceneNode in IrrEdit without IrrEdit's source code so all I can "see" is the SceneManager.
Oh and I have 7 years experience in C++ and two published games under my belt for Namco and EA Halifax. Just out of curiosity, what's your resume?
btw - I got round the problem by using the same method in the example Animators by just doing:
Code: Select all
// first update?
if( firstUpdate )
{
lastTime = timeMs;
firstUpdate = false;
}
// find the delta time in seconds
f32 timeDelta = (f32) (timeMs - lastTime) / 1000.0f;
I-Ninja and Catwoman (yea I know it was crap but we had around 8 months to do it and the design was poo). Ninja was a good little game though.
yea ok Halifax, reading it back I realise that now. I apologise. It's just that sometimes people are put off by others that know only a little more than they do and want to simply make themselves feel better. That and I was having one of those days
yea ok Halifax, reading it back I realise that now. I apologise. It's just that sometimes people are put off by others that know only a little more than they do and want to simply make themselves feel better. That and I was having one of those days

