Greetings dood!
In my latest conquest to become ruler of the Prinny Squad I have been trying to create a video game based on an example! The example is a very basic adventure game from Zenva (which has what feels like a really weird structure but it works).
But! I want to add animations to every enemy which is spawned by a factory function and to the player. I thought the best way to do this would be to create the animations in the main game scene. Then have the individual monsters access the relevant animations through their creation method. Unfortunately, while I can console.log the name of the animation without issue, when I try to use this.anims.play(animationName) the result is “cannot read property play of undefined”
Any help dood?