Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

phaser multi atlas animation

 preload ()
    {
        this.load.path = 'assets/animations/cybercity/';
        this.load.multiatlas('cybercity', 'cybercity-multi.json');
    }

    create ()
    {
        this.anims.create({ key: 'fly', frames: this.anims.generateFrameNames('cybercity', { start: 0, end: 98 }), repeat: -1 });
        this.add.sprite(400, 300).setScale(2.7).play('fly');
    }
Source by github.com #
 
PREVIOUS NEXT
Tagged: #phaser #multi #atlas #animation
ADD COMMENT
Topic
Name
8+5 =