void HHREnemy::OnLoop() { if(health<=0) { if(Living) { if(RunDeathSequence == false) { RunDeathSequence = true; explodeSfx.Play(); StartAnimating(); } else if(AnimationIsPlaying() == false) { RunDeathSequence = false; Kill(); } } } else { UpdateCollisionObj(); } HHRUnit::OnLoop(); }
bool AnimatedSprite::Initialise(Texture& texture) { m_frameWidth = 0; m_frameSpeed = 0; m_loop = false; m_paused = false; m_animating = true; Sprite::Initialise(texture); StartAnimating(); return (true); }