Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

phaser place on rectangle

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

    create ()
    {
        const rect = new Phaser.Geom.Rectangle(100, 100, 256, 256);
        const group = this.add.group({ key: 'ball', frameQuantity: 32 });
        Phaser.Actions.PlaceOnRectangle(group.getChildren(), rect);
    }
Source by github.com #
 
PREVIOUS NEXT
Tagged: #phaser #place #rectangle
ADD COMMENT
Topic
Name
3+4 =