dont know what to say
This commit is contained in:
parent
00c378374f
commit
e5f665a57b
@ -1,5 +1,5 @@
|
|||||||
Generated by: `find ./src -name '*.ts' | xargs wc -l`
|
Generated by: `find ./src -name '*.ts' | xargs wc -l`
|
||||||
74 ./src/main.ts
|
92 ./src/main.ts
|
||||||
1 ./src/vite-env.d.ts
|
1 ./src/vite-env.d.ts
|
||||||
17 ./src/classes/GameUIConstants.ts
|
17 ./src/classes/GameUIConstants.ts
|
||||||
145 ./src/classes/gui/TowerTab.ts
|
145 ./src/classes/gui/TowerTab.ts
|
||||||
@ -12,30 +12,32 @@ Generated by: `find ./src -name '*.ts' | xargs wc -l`
|
|||||||
60 ./src/classes/gui/Gemsmith.ts
|
60 ./src/classes/gui/Gemsmith.ts
|
||||||
154 ./src/classes/gui/EndGameDialog.ts
|
154 ./src/classes/gui/EndGameDialog.ts
|
||||||
220 ./src/classes/gui/GemTab.ts
|
220 ./src/classes/gui/GemTab.ts
|
||||||
|
59 ./src/classes/gui/GamePausedDialog.ts
|
||||||
36 ./src/classes/gui/MessageBox.ts
|
36 ./src/classes/gui/MessageBox.ts
|
||||||
205 ./src/classes/gui/Tooltip.ts
|
205 ./src/classes/gui/Tooltip.ts
|
||||||
126 ./src/classes/Definitions.ts
|
126 ./src/classes/Definitions.ts
|
||||||
77 ./src/classes/game/WaveManager.ts
|
77 ./src/classes/game/WaveManager.ts
|
||||||
260 ./src/classes/game/Grid.ts
|
260 ./src/classes/game/Grid.ts
|
||||||
51 ./src/classes/game/Gem.ts
|
51 ./src/classes/game/Gem.ts
|
||||||
112 ./src/classes/game/TowerBehaviours.ts
|
114 ./src/classes/game/TowerBehaviours.ts
|
||||||
152 ./src/classes/game/Tower.ts
|
154 ./src/classes/game/Tower.ts
|
||||||
180 ./src/classes/game/MissionStats.ts
|
180 ./src/classes/game/MissionStats.ts
|
||||||
100 ./src/classes/game/AnimationManager.ts
|
100 ./src/classes/game/AnimationManager.ts
|
||||||
177 ./src/classes/game/Creep.ts
|
177 ./src/classes/game/Creep.ts
|
||||||
47 ./src/classes/game/KeyboardManager.ts
|
47 ./src/classes/game/KeyboardManager.ts
|
||||||
98 ./src/classes/game/Projectile.ts
|
104 ./src/classes/game/Projectile.ts
|
||||||
86 ./src/classes/game/NotificationManager.ts
|
86 ./src/classes/game/NotificationManager.ts
|
||||||
130 ./src/classes/game/TowerManager.ts
|
130 ./src/classes/game/TowerManager.ts
|
||||||
71 ./src/classes/game/HighScoreManager.ts
|
71 ./src/classes/game/HighScoreManager.ts
|
||||||
76 ./src/classes/GuiObject.ts
|
76 ./src/classes/GuiObject.ts
|
||||||
198 ./src/classes/Assets.ts
|
203 ./src/classes/Assets.ts
|
||||||
52 ./src/classes/GameObject.ts
|
52 ./src/classes/GameObject.ts
|
||||||
70 ./src/classes/Bastion.ts
|
68 ./src/classes/Bastion.ts
|
||||||
30 ./src/classes/Events.ts
|
30 ./src/classes/Events.ts
|
||||||
28 ./src/scenes/Scene.ts
|
37 ./src/scenes/Scene.ts
|
||||||
|
17 ./src/scenes/Settings.ts
|
||||||
67 ./src/scenes/HowToPlay.ts
|
67 ./src/scenes/HowToPlay.ts
|
||||||
84 ./src/scenes/Main.ts
|
59 ./src/scenes/Main.ts
|
||||||
333 ./src/scenes/Game.ts
|
353 ./src/scenes/Game.ts
|
||||||
31 ./src/scenes/MissionPicker.ts
|
27 ./src/scenes/MissionPicker.ts
|
||||||
`4429 total`
|
`4536 total`
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import * as PIXI from 'pixi.js';
|
import * as PIXI from 'pixi.js';
|
||||||
import GameObject from './GameObject';
|
|
||||||
import GuiObject from './GuiObject';
|
import GuiObject from './GuiObject';
|
||||||
import Scene from '../scenes/Scene';
|
import Scene from '../scenes/Scene';
|
||||||
import { Grid } from './game/Grid';
|
import { Grid } from './game/Grid';
|
||||||
@ -10,7 +9,6 @@ import { AnimationManager } from './game/AnimationManager';
|
|||||||
import NotificationManager from './game/NotificationManager';
|
import NotificationManager from './game/NotificationManager';
|
||||||
import Gem from './game/Gem';
|
import Gem from './game/Gem';
|
||||||
import GameAssets from './Assets';
|
import GameAssets from './Assets';
|
||||||
import { GemType } from './Definitions';
|
|
||||||
|
|
||||||
export class Engine {
|
export class Engine {
|
||||||
public static app: PIXI.Application;
|
public static app: PIXI.Application;
|
||||||
@ -33,10 +31,10 @@ export class Engine {
|
|||||||
public static TestSuite() {
|
public static TestSuite() {
|
||||||
let params = new URLSearchParams(location.href);
|
let params = new URLSearchParams(location.href);
|
||||||
if (params.entries().next().value[1] != 'game') return;
|
if (params.entries().next().value[1] != 'game') return;
|
||||||
|
|
||||||
Engine.NotificationManager.Notify('Loaded testing suite.', 'danger');
|
Engine.NotificationManager.Notify('Loaded testing suite.', 'danger');
|
||||||
|
let tower = GameAssets.Towers[0];
|
||||||
Engine.TowerManager.ToggleChoosingTowerLocation('RESET');
|
Engine.TowerManager.ToggleChoosingTowerLocation('RESET');
|
||||||
Engine.TowerManager.PlaceTower(GameAssets.Towers[0], 6, 10, GameAssets.Towers[0].behaviour, true);
|
Engine.TowerManager.PlaceTower(tower, 6, 10, tower.behaviour, true);
|
||||||
for (let i = 0; i < 29; i++) {
|
for (let i = 0; i < 29; i++) {
|
||||||
this.GameScene.MissionStats.giveGem(new Gem(i % 4), true);
|
this.GameScene.MissionStats.giveGem(new Gem(i % 4), true);
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,7 @@ export default class GamePausedDialog extends ModalDialogBase {
|
|||||||
private onMainMenuClick(): void {
|
private onMainMenuClick(): void {
|
||||||
this.close();
|
this.close();
|
||||||
this._unsubKeypress();
|
this._unsubKeypress();
|
||||||
|
Engine.GameScene.UnpauseGame();
|
||||||
Engine.GameScene.destroy();
|
Engine.GameScene.destroy();
|
||||||
Engine.GameMaster.changeScene(new MissionPickerScene());
|
Engine.GameMaster.changeScene(new MissionPickerScene());
|
||||||
}
|
}
|
||||||
@ -44,6 +45,7 @@ export default class GamePausedDialog extends ModalDialogBase {
|
|||||||
const missionName = Engine.GameScene.mission.name;
|
const missionName = Engine.GameScene.mission.name;
|
||||||
this.close();
|
this.close();
|
||||||
this._unsubKeypress();
|
this._unsubKeypress();
|
||||||
|
Engine.GameScene.UnpauseGame();
|
||||||
Engine.GameScene.destroy();
|
Engine.GameScene.destroy();
|
||||||
Engine.GameMaster.changeScene(new MissionPickerScene());
|
Engine.GameMaster.changeScene(new MissionPickerScene());
|
||||||
Engine.GameMaster.changeScene(new GameScene(missionName));
|
Engine.GameMaster.changeScene(new GameScene(missionName));
|
||||||
|
@ -6,6 +6,7 @@ import { HowToPlay } from './HowToPlay';
|
|||||||
import { MissionPickerScene } from './MissionPicker';
|
import { MissionPickerScene } from './MissionPicker';
|
||||||
import Scene from './Scene';
|
import Scene from './Scene';
|
||||||
import * as PIXI from 'pixi.js';
|
import * as PIXI from 'pixi.js';
|
||||||
|
import { SettingsScene } from './Settings';
|
||||||
|
|
||||||
export class MainScene extends Scene {
|
export class MainScene extends Scene {
|
||||||
public init() {
|
public init() {
|
||||||
@ -35,7 +36,7 @@ export class MainScene extends Scene {
|
|||||||
y: 0,
|
y: 0,
|
||||||
text: 'Latest commit: ' + Engine.latestCommit,
|
text: 'Latest commit: ' + Engine.latestCommit,
|
||||||
style: {
|
style: {
|
||||||
fill: 0x000000,
|
fill: 0xffffff,
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
},
|
},
|
||||||
@ -46,10 +47,10 @@ export class MainScene extends Scene {
|
|||||||
Engine.GameMaster.changeScene(new MissionPickerScene());
|
Engine.GameMaster.changeScene(new MissionPickerScene());
|
||||||
};
|
};
|
||||||
|
|
||||||
let b2 = new Button(SettingsButton.rect, SettingsButton.caption, SettingsButton.texture, true);
|
// let b2 = new Button(SettingsButton.rect, SettingsButton.caption, SettingsButton.texture, true);
|
||||||
b2.onClick = (e) => {
|
// b2.onClick = (e) => {
|
||||||
Engine.NotificationManager.Notify('Not finished.', 'info');
|
// Engine.GameMaster.changeScene(new SettingsScene());
|
||||||
};
|
// };
|
||||||
let b3 = new Button(TutorialButton.rect, TutorialButton.caption, TutorialButton.texture, true);
|
let b3 = new Button(TutorialButton.rect, TutorialButton.caption, TutorialButton.texture, true);
|
||||||
b3.onClick = (e) => {
|
b3.onClick = (e) => {
|
||||||
Engine.GameMaster.changeScene(new HowToPlay());
|
Engine.GameMaster.changeScene(new HowToPlay());
|
||||||
|
17
src/scenes/Settings.ts
Normal file
17
src/scenes/Settings.ts
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import Assets from '../classes/Assets';
|
||||||
|
import { Engine } from '../classes/Bastion';
|
||||||
|
import Button, { ButtonTexture } from '../classes/gui/Button';
|
||||||
|
import { GameScene } from './Game';
|
||||||
|
import { MainScene } from './Main';
|
||||||
|
import Scene from './Scene';
|
||||||
|
import * as PIXI from 'pixi.js';
|
||||||
|
|
||||||
|
export class SettingsScene extends Scene {
|
||||||
|
public init() {
|
||||||
|
this.addMainBackground();
|
||||||
|
const button = new Button(new PIXI.Rectangle(10, 10, 300, 60), 'Back to main', ButtonTexture.Button01);
|
||||||
|
button.onClick = (e) => {
|
||||||
|
Engine.GameMaster.changeScene(new MainScene());
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user