added attack sounds for player
Signed-off-by: Pascal Syma <pascal@syma.dev>
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -15,6 +15,7 @@ export default class AttackA extends Hitbox {
|
|||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
this.scene.sound.play('attack_a', {volume: 0.5})
|
||||||
this.setData('active', true);
|
this.setData('active', true);
|
||||||
this.player.play('attack_a', true)
|
this.player.play('attack_a', true)
|
||||||
.once('animationcomplete', () => {
|
.once('animationcomplete', () => {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export default class AttackA extends Hitbox {
|
|||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
this.scene.sound.play('attack_b', {volume: 0.5})
|
||||||
this.setData('active', true);
|
this.setData('active', true);
|
||||||
this.player.play('attack_b', true)
|
this.player.play('attack_b', true)
|
||||||
.once('animationcomplete', () => {
|
.once('animationcomplete', () => {
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ import menu_click from "../assets/audio/menu_click.wav";
|
|||||||
import menu_hover from "../assets/audio/menu_hover.wav";
|
import menu_hover from "../assets/audio/menu_hover.wav";
|
||||||
import background_start from "../assets/audio/background_start.wav";
|
import background_start from "../assets/audio/background_start.wav";
|
||||||
import background_loop from "../assets/audio/background_loop.wav";
|
import background_loop from "../assets/audio/background_loop.wav";
|
||||||
|
import attack_a from "../assets/audio/attack_a.wav";
|
||||||
|
import attack_b from "../assets/audio/attack_b.wav";
|
||||||
|
|
||||||
export default class Preload extends Phaser.Scene {
|
export default class Preload extends Phaser.Scene {
|
||||||
|
|
||||||
@@ -70,6 +72,8 @@ export default class Preload extends Phaser.Scene {
|
|||||||
this.load.audio('menu_hover', menu_hover);
|
this.load.audio('menu_hover', menu_hover);
|
||||||
this.load.audio('background_start', background_start);
|
this.load.audio('background_start', background_start);
|
||||||
this.load.audio('background_loop', background_loop);
|
this.load.audio('background_loop', background_loop);
|
||||||
|
this.load.audio('attack_a', attack_a);
|
||||||
|
this.load.audio('attack_b', attack_b);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user