Merge remote-tracking branch 'github/master'
This commit is contained in:
commit
4705b38775
BIN
dist/shattered_sword_assets/images/brown.png
vendored
Normal file
BIN
dist/shattered_sword_assets/images/brown.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 42 KiB |
BIN
dist/shattered_sword_assets/sounds/dash.wav
vendored
Normal file
BIN
dist/shattered_sword_assets/sounds/dash.wav
vendored
Normal file
Binary file not shown.
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){
|
if(this.enemies.length != 0){
|
||||||
for (let enemy of this.enemies) {
|
for (let enemy of this.enemies) {
|
||||||
if (weapon.hits(enemy.owner)) {
|
if (weapon.hits(enemy.owner)) {
|
||||||
|
|
||||||
let player = (<PlayerController>this.players[0]);
|
let player = (<PlayerController>this.players[0]);
|
||||||
|
|
||||||
if(player.fullHpBonus){
|
if(player.fullHpBonus){
|
||||||
|
|
|
@ -7,7 +7,7 @@ import BattleManager from "../BattleManager";
|
||||||
import Item from "./Item";
|
import Item from "./Item";
|
||||||
import WeaponType from "./WeaponTypes/WeaponType";
|
import WeaponType from "./WeaponTypes/WeaponType";
|
||||||
import Vec2 from "../../../Wolfie2D/DataTypes/Vec2";
|
import Vec2 from "../../../Wolfie2D/DataTypes/Vec2";
|
||||||
|
import { GameEventType } from "../../../Wolfie2D/Events/GameEventType";
|
||||||
|
|
||||||
export default class Weapon extends Item {
|
export default class Weapon extends Item {
|
||||||
/** The type of this weapon */
|
/** The type of this weapon */
|
||||||
|
@ -74,7 +74,9 @@ export default class Weapon extends Item {
|
||||||
|
|
||||||
// Reset the cooldown timer
|
// Reset the cooldown timer
|
||||||
this.cooldownTimer.start();
|
this.cooldownTimer.start();
|
||||||
|
//TODO - may have to move elsewhere
|
||||||
|
this.emitter.fireEvent(GameEventType.PLAY_SOUND, {key: "sword", loop: false, holdReference: false});
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ export default class Slice extends WeaponType {
|
||||||
// Play the slice animation w/o loop, but queue the normal animation
|
// Play the slice animation w/o loop, but queue the normal animation
|
||||||
sliceSprite.animation.play("SLICE");
|
sliceSprite.animation.play("SLICE");
|
||||||
sliceSprite.animation.queue("NORMAL", true);
|
sliceSprite.animation.queue("NORMAL", true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
createRequiredAssets(scene: Scene): [AnimatedSprite] {
|
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 there is an item in the current slot, use it
|
||||||
if (item) {
|
if (item) {
|
||||||
item.use(this.owner, "player", this.lookDirection);
|
item.use(this.owner, "player", this.lookDirection);
|
||||||
|
//this.emitter.fireEvent(GameEventType.PLAY_SOUND, {key: "sword", loop: false, holdReference: false});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ import AnimatedSprite from "../../../Wolfie2D/Nodes/Sprites/AnimatedSprite";
|
||||||
import InAir from "./InAir";
|
import InAir from "./InAir";
|
||||||
import InputWrapper from "../../Tools/InputWrapper";
|
import InputWrapper from "../../Tools/InputWrapper";
|
||||||
import PlayerState from "./PlayerState";
|
import PlayerState from "./PlayerState";
|
||||||
|
import { GameEventType } from "../../../Wolfie2D/Events/GameEventType";
|
||||||
|
|
||||||
export default class Fall extends InAir {
|
export default class Fall extends InAir {
|
||||||
owner: AnimatedSprite;
|
owner: AnimatedSprite;
|
||||||
|
@ -13,6 +14,7 @@ export default class Fall extends InAir {
|
||||||
|
|
||||||
update(deltaT: number): void {
|
update(deltaT: number): void {
|
||||||
if (!PlayerState.dashTimer.isStopped()) {
|
if (!PlayerState.dashTimer.isStopped()) {
|
||||||
|
this.emitter.fireEvent(GameEventType.PLAY_SOUND, {key: "dash", loop: false, holdReference: false});
|
||||||
this.owner.animation.playIfNotAlready("DASH");
|
this.owner.animation.playIfNotAlready("DASH");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -19,6 +19,7 @@ export default class Jump extends InAir {
|
||||||
|
|
||||||
update(deltaT: number): void {
|
update(deltaT: number): void {
|
||||||
if (!PlayerState.dashTimer.isStopped()) {
|
if (!PlayerState.dashTimer.isStopped()) {
|
||||||
|
this.emitter.fireEvent(GameEventType.PLAY_SOUND, {key: "dash", loop: false, holdReference: false});
|
||||||
this.owner.animation.playIfNotAlready("DASH");
|
this.owner.animation.playIfNotAlready("DASH");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -4,6 +4,7 @@ import InputWrapper from "../../Tools/InputWrapper";
|
||||||
import { PlayerStates } from "../PlayerController";
|
import { PlayerStates } from "../PlayerController";
|
||||||
import OnGround from "./OnGround";
|
import OnGround from "./OnGround";
|
||||||
import PlayerState from "./PlayerState";
|
import PlayerState from "./PlayerState";
|
||||||
|
import { GameEventType } from "../../../Wolfie2D/Events/GameEventType";
|
||||||
|
|
||||||
export default class Walk extends OnGround {
|
export default class Walk extends OnGround {
|
||||||
owner: AnimatedSprite;
|
owner: AnimatedSprite;
|
||||||
|
@ -16,6 +17,7 @@ export default class Walk extends OnGround {
|
||||||
|
|
||||||
update(deltaT: number): void {
|
update(deltaT: number): void {
|
||||||
if (!PlayerState.dashTimer.isStopped()) {
|
if (!PlayerState.dashTimer.isStopped()) {
|
||||||
|
this.emitter.fireEvent(GameEventType.PLAY_SOUND, {key: "dash", loop: false, holdReference: false});
|
||||||
this.owner.animation.playIfNotAlready("DASH");
|
this.owner.animation.playIfNotAlready("DASH");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -159,9 +159,12 @@ export default class GameLevel extends Scene {
|
||||||
this.load.audio("jump", "shattered_sword_assets/sounds/jump2.wav");
|
this.load.audio("jump", "shattered_sword_assets/sounds/jump2.wav");
|
||||||
this.load.audio("hurt", "shattered_sword_assets/sounds/hurt.wav");
|
this.load.audio("hurt", "shattered_sword_assets/sounds/hurt.wav");
|
||||||
this.load.audio("die", "shattered_sword_assets/sounds/die.wav");
|
this.load.audio("die", "shattered_sword_assets/sounds/die.wav");
|
||||||
|
this.load.audio("dash", "shattered_sword_assets/sounds/dash.wav");
|
||||||
this.load.audio("level_up","shattered_sword_assets/sounds/level_up.wav");
|
this.load.audio("level_up","shattered_sword_assets/sounds/level_up.wav");
|
||||||
//神社(じんじゃ)祭(まつり) by Second Dimension Imagination Group
|
//神社(じんじゃ)祭(まつり) 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("knife", "shattered_sword_assets/sprites/knife.png");
|
||||||
|
@ -976,7 +979,7 @@ export default class GameLevel extends Scene {
|
||||||
protected playStartStory() {
|
protected playStartStory() {
|
||||||
if (!this.touchedStartCheckPoint) {
|
if (!this.touchedStartCheckPoint) {
|
||||||
this.touchedStartCheckPoint = true;
|
this.touchedStartCheckPoint = true;
|
||||||
this.storyLoader("shattered_sword_assets/jsons/level1story.json");
|
this.storyLoader("shattered_sword_assets/jsons/story.json");
|
||||||
this.startTimer();
|
this.startTimer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,8 +22,8 @@ export default class SplashScreen extends Scene {
|
||||||
|
|
||||||
loadScene(): void {
|
loadScene(): void {
|
||||||
//load images
|
//load images
|
||||||
this.load.image("logo", "shattered_sword_assets/images/black.png");
|
|
||||||
this.load.image("backgroundImage", "shattered_sword_assets/images/logo.png");
|
this.load.image("backgroundImage", "shattered_sword_assets/images/logo.png");
|
||||||
|
this.load.image("logo", "shattered_sword_assets/images/brown.png");
|
||||||
// Load the menu song
|
// Load the menu song
|
||||||
//this.load.audio("menu", "assets/music/menu.mp3");
|
//this.load.audio("menu", "assets/music/menu.mp3");
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,4 +45,12 @@ export default class Tutorial extends GameLevel {
|
||||||
this.viewport.setZoomLevel(1);
|
this.viewport.setZoomLevel(1);
|
||||||
this.sceneManager.changeToScene(Porcelain);
|
this.sceneManager.changeToScene(Porcelain);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected playStartStory(): void {
|
||||||
|
if (!this.touchedStartCheckPoint) {
|
||||||
|
this.touchedStartCheckPoint = true;
|
||||||
|
this.storyLoader("shattered_sword_assets/jsons/level1story.json");
|
||||||
|
this.startTimer();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user