O'Reilly logo

Starling Game Development Essentials by Juwal Bose

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The CustomAnimatedItem class

For the usual purpose of displaying an animated item, we all can use the default Starling MovieClip class. For creating an animated character, we will need to make sure that we have a method to control the different animations it can perform. For example, our character needs the animations such as idle, walk, attack, die, idle with blue flag, idle with green flag, walk with blue flag, walk with green flag, attack with blue flag, and attack with green flag. All these animations are needed for four directions as our game is isometric. Considering that we have two types of characters, green and blue, this amounts to handling a lot of movie clips per character. So, I have created a new class which skips the use of MovieClip ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required