Sega Genesis Dev Kit (SGDK)

SGDK only sub forum

Moderator: Stef

Mixail
Very interested
Posts: 115
Joined: Thu Nov 18, 2010 4:47 pm

Re: Sega Genesis Dev Kit (SGDK)

Post by Mixail » Fri Feb 14, 2020 2:53 pm

How to turn off looping animation in "sprite_eng"?
How to change animation speed?

Stef
Very interested
Posts: 3007
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Sega Genesis Dev Kit (SGDK)

Post by Stef » Mon Feb 17, 2020 11:04 am

There is no real way of doing that automatically yet unfortunately.
To disable looping you need to set sprite->timer to 0 when you're reaching last animation frame (setting timer to 0 actually disable auto animation).
Also to change animation speed, again you need to set manually the sprite->timer variable manually after changing animation frame, to be honest in this case it's just more convenient to handle animation manually (letting timer to 0 and using setFrame / setAnimation methods manually).

Mixail
Very interested
Posts: 115
Joined: Thu Nov 18, 2010 4:47 pm

Re: Sega Genesis Dev Kit (SGDK)

Post by Mixail » Mon Feb 17, 2020 4:29 pm

Stef, Thanks!

Post Reply