aabb
This commit is contained in:
parent
f4df06d44f
commit
ea2d3b41b2
@ -35,6 +35,7 @@ export default class GameAssets {
|
||||
public static PlayIconTexture: PIXI.Texture;
|
||||
public static PauseIconTexture: PIXI.Texture;
|
||||
public static ExclamationIconTexture: PIXI.Texture;
|
||||
public static FastForwardIconTexture: PIXI.Texture;
|
||||
public static HomeIconTexture: PIXI.Texture;
|
||||
public static HammerIconTexture: PIXI.Texture;
|
||||
public static XIconTexture: PIXI.Texture;
|
||||
@ -118,7 +119,8 @@ export default class GameAssets {
|
||||
this.Load('./assets/gui/title01.png').then((texture) => (this.TitleTexture = texture)),
|
||||
this.Load('./assets/gui/icons/play.png').then((texture) => (this.PlayIconTexture = texture)),
|
||||
this.Load('./assets/gui/icons/pause.png').then((texture) => (this.PauseIconTexture = texture)),
|
||||
this.Load('./assets/gui/icons/exclamation.png').then((texture) => (this.ExclamationIconTexture = texture)),
|
||||
this.Load('./assets/gui/icons/pause.png').then((texture) => (this.PauseIconTexture = texture)),
|
||||
this.Load('./assets/gui/icons/fastforward.png').then((texture) => (this.FastForwardIconTexture = texture)),
|
||||
this.Load('./assets/gui/icons/home.png').then((texture) => (this.HomeIconTexture = texture)),
|
||||
this.Load('./assets/gui/icons/hammer.png').then((texture) => (this.HammerIconTexture = texture)),
|
||||
this.Load('./assets/gui/icons/cross.png').then((texture) => (this.XIconTexture = texture)),
|
||||
|
@ -37,6 +37,7 @@ export class GameScene extends Scene {
|
||||
public tooltip: Tooltip;
|
||||
public towerPanel: TowerPanel;
|
||||
public isPaused: boolean = false;
|
||||
private isFastForwarded: boolean = false;
|
||||
private pauseButton: Button;
|
||||
private visualGems: VisualGemSlot[] = [];
|
||||
private currentRound: number = 0;
|
||||
@ -103,12 +104,20 @@ export class GameScene extends Scene {
|
||||
this.changeRoundButton.CustomButtonLogic();
|
||||
this.changeRoundButton.onClick = () => {
|
||||
if (this.playerWon) return this.ReturnToMain();
|
||||
if (this.roundMode == RoundMode.Combat)
|
||||
return Engine.NotificationManager.Notify('Wave is already in progress.', 'warn');
|
||||
if (this.roundMode == RoundMode.Combat) {
|
||||
// TODO: figure out how to actually double speed without causing bugs.
|
||||
if (this.isFastForwarded) {
|
||||
this.isFastForwarded = false;
|
||||
Engine.NotificationManager.Notify('Regular speed.', 'info');
|
||||
} else {
|
||||
this.isFastForwarded = true;
|
||||
Engine.NotificationManager.Notify('Fast forward activated.', 'info');
|
||||
}
|
||||
}
|
||||
if (this.isGameOver) return Engine.NotificationManager.Notify('No more waves.', 'danger');
|
||||
if (this.roundMode == RoundMode.Misc) return;
|
||||
this.setRoundMode(RoundMode.Combat);
|
||||
this.changeRoundButton.buttonIcon.texture = GameAssets.ExclamationIconTexture;
|
||||
this.changeRoundButton.buttonIcon.texture = GameAssets.FastForwardIconTexture;
|
||||
this.events.emit(WaveManagerEvents.NewWave, `${this.currentRound + 1}`);
|
||||
};
|
||||
this.MissionStats = new MissionStats(125, 450);
|
||||
@ -156,10 +165,10 @@ export class GameScene extends Scene {
|
||||
|
||||
this.ticker.add(() => {
|
||||
if (this.update) this.update(this.ticker.elapsedMS);
|
||||
// if (this.isFastForwarded) this.update(this.ticker.elapsedMS);
|
||||
});
|
||||
this.ticker.start();
|
||||
}
|
||||
|
||||
public update(elapsedMS) {
|
||||
if (this.isGameOver) {
|
||||
if (this.destroyTicker) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user