mirror of
https://github.com/OpenLiberty/liberty-bikes.git
synced 2025-03-07 11:26:52 +08:00
Use new higher resolution player image
This commit is contained in:
parent
47a698bf20
commit
da95f9280b
@ -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();
|
||||
|
@ -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');
|
||||
}
|
||||
|
BIN
frontend/prebuild/src/assets/images/bike_full.png
Normal file
BIN
frontend/prebuild/src/assets/images/bike_full.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 766 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.0 KiB |
Loading…
Reference in New Issue
Block a user