mirror of
https://github.com/OpenLiberty/liberty-bikes.git
synced 2025-01-30 10:40:13 +08:00
commit
a0abb0a1a5
@ -51,14 +51,17 @@ export class Player {
|
||||
}
|
||||
|
||||
public setStatus(status: string) {
|
||||
this.status = status;
|
||||
if (status === 'Dead') {
|
||||
if (status === 'Dead' && this.status !== 'Dead') {
|
||||
this.image = new Bitmap('../../assets/images/status_dead.png');
|
||||
this.image.scaleX = 0.7;
|
||||
this.image.scaleY = 0.7;
|
||||
this.image.x = this.x - 10;
|
||||
this.image.y = this.y - 10;
|
||||
var bam = new Audio('../../assets/sound/bam.wav');
|
||||
bam.load();
|
||||
bam.play();
|
||||
}
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public addTo(stage: Stage) {
|
||||
|
BIN
frontend/prebuild/src/assets/sound/bam.wav
Normal file
BIN
frontend/prebuild/src/assets/sound/bam.wav
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user