コード例 #1
0
ファイル: HHREnemy.cpp プロジェクト: Samurai336/HHRLinux
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();

}
コード例 #2
0
ファイル: animatedsprite.cpp プロジェクト: D4vx/SDL-Framework
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);
}