-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Open
Description
preload() {
this.load.image('pic', 'assets/sprites/space-baddie.png');
}
create() {
this.test1 = this.add.tileSprite(320, 200, 100, 100, 'pic');
}
update() {
this.test1.setSize(200, 200); // Change size _after_ creating instance.
}Before the new renderer, the new size respected the origin, i.e. in this example it would grow out from center (default origin being 0.5). Local to global X/Y remains at origin (global changes).
In new renderer the "center" point moves with the size change, i.e. the tilesprite's top-left point does not move, and it only expands bottom-right. Local to global X/Y remains fixed (relative to local changes).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels