Right I've got an animation class - happy happy joy - and it has an inline function, SetUpdateDelay:
Code:
void SetUpdateDelay(float delay)
{
m_UpdateDelay = delay;
}
Looks pretty normal; what could go wrong, right? Wrong.
I'm calling this function like so:
Code:
CAnimation explosion;
explosion.AddFrame(m_ResourceMgr->GetTexture("./data/Explosion 1.png"));
explosion.AddFrame(m_ResourceMgr->GetTexture("./data/Explosion 2.png"));
m_Renderer->AddSceneObject("Explosion", explosion, CVector2<int>(100, 100));
explosion.SetUpdateDelay(0.05f);
If I step through it, CAnimation::m_UpdateDelay does indeed get set to 0.05. When I step through the update function, according to the debugger m_UpdateDelay is back to 250.0f (it's default value).
What the hell am I doing wrong? I'm going to make the default value 0.05 right now and run that... otherwise I'm f'ing stumped.