Animation events on Phaser3

Discuss issues pertaining to the various game/web runtimes of Creature here.
Post Reply
vainiillaguy
Posts: 2
Joined: Sun Dec 01, 2019 1:59 pm

Animation events on Phaser3

Post by vainiillaguy » Sun Dec 01, 2019 2:03 pm

Hi, i want to know how can i get the callbacks of the animation events pinned in Creature.
Im using phaser 3 but don't managed to find anything, the same with others JS runtimes.

Use case: i have a running animation so i want to play (in phaser for ex.) a step sound every time the character makes contact with the ground.

This is like the only one thing that is stopping me from buy creature vs the other main competitor :)

Thanks and hope to have an answer today to enjoy creature this sunday!

chong
Posts: 1045
Joined: Thu Feb 19, 2015 2:21 am

Re: Animation events on Phaser3

Post by chong » Mon Dec 02, 2019 12:02 pm

Hello,

So right now the callbacks are not in the CreaturePack runtimes since it is a more lightweight ( but higher performance ) version of the Creature runtimes.

I do suggest however that you can do an easy "lite" version of it which is to simply get the sample the current frame of your animation ( after each animation step, you can retrieve the current frame ). Then you can simply fire off whatever custom event you want based on that animation frame.

Thanks

vainiillaguy
Posts: 2
Joined: Sun Dec 01, 2019 1:59 pm

Re: Animation events on Phaser3

Post by vainiillaguy » Mon Dec 02, 2019 5:16 pm

Sounds cool as an alternative.
Thank you ^_^

Post Reply