Use new higher resolution player image

This commit is contained in:
Andrew Guibert 2018-05-22 09:25:02 -05:00
parent 47a698bf20
commit da95f9280b
4 changed files with 5 additions and 4 deletions

View File

@ -37,10 +37,11 @@ export class Player {
this.displayObject.addChild(this.tooltip.tooltipShape);
this.image = Assets.PLAYER_BITMAP.clone();
this.image.scaleX = 1 / 60;
this.image.scaleY = 1 / 60;
// Set the center point of the player image to be the front 1/3 of the area
this.image.regX = this.image.getBounds().width / 2;
this.image.regY = this.image.getBounds().height / 2;
this.image.scaleX = 2.0;
this.image.scaleY = 2.0;
this.image.regY = this.image.getBounds().height / 3;
this.displayObject.addChild(this.image);
this.explosionImage = Assets.PLAYER_DEAD_BITMAP.clone();

View File

@ -3,7 +3,7 @@ import { Bitmap } from "createjs-module";
export class Assets {
// According to EaselJS, "When a string path or image tag that is not yet loaded is used, the stage may need to be redrawn before the Bitmap will be displayed."
// For this reason, we need to pre-load an instance of the image (this copy never gets used)
static readonly PLAYER_BITMAP = new Bitmap('../../assets/images/bike_wide.png');
static readonly PLAYER_BITMAP = new Bitmap('../../assets/images/bike_full.png');
static readonly PLAYER_DEAD_BITMAP = new Bitmap('../../assets/images/status_dead.png');
static readonly BAM = new Audio('../../assets/sound/bam.wav');
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB