HI
I had asked the question as long time ago but was answer me, to found another way, photoshop, because it was complicated.
However, I am falling on this function.
Is there a reason for she not takings the arrays?
Is this the right way to do it?
I do not know the reason well, but it must be very good.
Why not allow to choose the Origin anchor.x, and anchor.y ?
Is this change the right way to do it?
Or will it cause me some performance or other issues?
and for example
// $gameScreen.showPicture(500, 'filename', [0,0.5], 0, 0, 100, 100, 255, 0);
make the origin left,middle !
thanks a lot for suggest and answer
I had asked the question as long time ago but was answer me, to found another way, photoshop, because it was complicated.
However, I am falling on this function.
Is there a reason for she not takings the arrays?
Is this the right way to do it?
I do not know the reason well, but it must be very good.
Why not allow to choose the Origin anchor.x, and anchor.y ?
Code:
Sprite_Picture.prototype.updateOrigin = function() {
var picture = this.picture();
if (picture.origin() === 0) {
this.anchor.x = 0;
this.anchor.y = 0;
} else {
this.anchor.x = 0.5;
this.anchor.y = 0.5;
}
};
Or will it cause me some performance or other issues?
Code:
Sprite_Picture.prototype.updateOrigin = function() {
var picture = this.picture();
var o = picture.origin();
if (o === 0) {
this.anchor.x = 0;
this.anchor.y = 0;
} else if(o === 1) {
this.anchor.x = 0.5;
this.anchor.y = 0.5;
}else {
this.anchor.x = o[0];
this.anchor.y = o[1];
}
};
// $gameScreen.showPicture(500, 'filename', [0,0.5], 0, 0, 100, 100, 255, 0);
make the origin left,middle !
thanks a lot for suggest and answer
