draw tiled only by X

This commit is contained in:
Alexander Popov 2023-04-30 18:59:50 +03:00
parent 8ea015eee0
commit 1e50ed7a48
Signed by: iiiypuk
GPG Key ID: E47FE0AB36CD5ED6

View File

@ -132,6 +132,9 @@ export class TiledSprite extends Sprite {
case 'y': case 'y':
context.drawImage(this.image(), this.x, this.y - this.image().height * iy); context.drawImage(this.image(), this.x, this.y - this.image().height * iy);
break; break;
case 'x':
context.drawImage(this.image(), this.x - this.image().width * ix, this.y);
break;
case null: case null:
default: default:
context.drawImage( context.drawImage(
@ -163,6 +166,9 @@ export class TiledSprite extends Sprite {
case 'y': case 'y':
context.drawImage(this.image(), this.x, this.y + this.image().height * iy); context.drawImage(this.image(), this.x, this.y + this.image().height * iy);
break; break;
case 'x':
context.drawImage(this.image(), this.x + this.image().width * ix, this.y);
break;
case null: case null:
default: default:
context.drawImage( context.drawImage(