added sword sound
This commit is contained in:
parent
c630ed7bd1
commit
237ba6659b
BIN
dist/shattered_sword_assets/sounds/sword_ding.m4a
vendored
Normal file
BIN
dist/shattered_sword_assets/sounds/sword_ding.m4a
vendored
Normal file
Binary file not shown.
|
@ -19,6 +19,7 @@ export default class BattleManager {
|
|||
if(this.enemies.length != 0){
|
||||
for (let enemy of this.enemies) {
|
||||
if (weapon.hits(enemy.owner)) {
|
||||
|
||||
let player = (<PlayerController>this.players[0]);
|
||||
|
||||
if(player.fullHpBonus){
|
||||
|
|
|
@ -7,7 +7,7 @@ import BattleManager from "../BattleManager";
|
|||
import Item from "./Item";
|
||||
import WeaponType from "./WeaponTypes/WeaponType";
|
||||
import Vec2 from "../../../Wolfie2D/DataTypes/Vec2";
|
||||
|
||||
import { GameEventType } from "../../../Wolfie2D/Events/GameEventType";
|
||||
|
||||
export default class Weapon extends Item {
|
||||
/** The type of this weapon */
|
||||
|
@ -74,6 +74,8 @@ export default class Weapon extends Item {
|
|||
|
||||
// Reset the cooldown timer
|
||||
this.cooldownTimer.start();
|
||||
//TODO - may have to move elsewhere
|
||||
this.emitter.fireEvent(GameEventType.PLAY_SOUND, {key: "sword", loop: false, holdReference: false});
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ export default class Slice extends WeaponType {
|
|||
// Play the slice animation w/o loop, but queue the normal animation
|
||||
sliceSprite.animation.play("SLICE");
|
||||
sliceSprite.animation.queue("NORMAL", true);
|
||||
|
||||
}
|
||||
|
||||
createRequiredAssets(scene: Scene): [AnimatedSprite] {
|
||||
|
|
|
@ -236,6 +236,7 @@ export default class PlayerController extends StateMachineAI implements BattlerA
|
|||
// If there is an item in the current slot, use it
|
||||
if (item) {
|
||||
item.use(this.owner, "player", this.lookDirection);
|
||||
//this.emitter.fireEvent(GameEventType.PLAY_SOUND, {key: "sword", loop: false, holdReference: false});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -161,8 +161,8 @@ export default class GameLevel extends Scene {
|
|||
this.load.audio("die", "shattered_sword_assets/sounds/die.wav");
|
||||
this.load.audio("level_up","shattered_sword_assets/sounds/level_up.wav");
|
||||
//神社(じんじゃ)祭(まつり) by Second Dimension Imagination Group
|
||||
this.load.audio("level_music","shattered_sword_assets/sounds/bgm1.mp3")
|
||||
|
||||
this.load.audio("level_music","shattered_sword_assets/sounds/bgm1.mp3");
|
||||
this.load.audio("sword","shattered_sword_assets/sounds/sword_ding.m4a");
|
||||
|
||||
this.load.image("knife", "shattered_sword_assets/sprites/knife.png");
|
||||
this.load.image("inventorySlot", "shattered_sword_assets/sprites/inventory.png");
|
||||
|
|
Loading…
Reference in New Issue
Block a user