/phaserjs/toolbox/utilities/align.js

Twetch ·

/phaserjs/toolbox/utilities/align.js

Replies

Twetch ·

static centerH(obj){
obj.x = game.config.width / 2;
}

static centerV(obj){
obj.y = game.config.height / 2;
}
}

Twetch ·

class Align
{
static scaleToGameW(obj,per)
{
obj.displayWidth=game.config.width*per;
obj.scaleY=obj.scaleX;
}

static center(obj) {
obj.x = game.config.width / 2;
obj.y = game.config.height / 2;
}

Twetch ·

"center it"