Ejemplo n.º 1
0
	void Sprite::setAnimFrame(const ResAnim *resanim, int col, int row)
	{
		//OX_ASSERT(resanim);
		if (!resanim)
		{
			changeAnimFrame(AnimationFrame());
			return;
		}

		const AnimationFrame &frame = resanim->getFrame(col, row);
		changeAnimFrame(frame);
	}
Ejemplo n.º 2
0
    void Sprite::setAnimFrame(const ResAnim* resanim, int col, int row)
    {
        //OX_ASSERT(resanim);
        if (!resanim)
        {
            changeAnimFrame(AnimationFrame());
            return;
        }

        if (resanim->getTotalFrames())
        {
            const AnimationFrame& frame = resanim->getFrame(col, row);
            changeAnimFrame(frame);
        }
        else
        {
            AnimationFrame frame;
            frame.setSize(getSize());
            changeAnimFrame(frame);
        }
    }
Ejemplo n.º 3
0
 void Sprite::setAnimFrame(const AnimationFrame& f)
 {
     changeAnimFrame(f);
 }