Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

phaser place on line

 preload ()
    {
        this.load.image('ball', 'assets/sprites/shinyball.png');
    }

    create ()
    {
        const line = new Phaser.Geom.Line(100, 200, 600, 400);
        const group = this.add.group({ key: 'ball', frameQuantity: 32 });

        Phaser.Actions.PlaceOnLine(group.getChildren(), line);
    }
Source by github.com #
 
PREVIOUS NEXT
Tagged: #phaser #place #line
ADD COMMENT
Topic
Name
7+2 =