diff --git a/src/shattered_sword/Scenes/GameLevel.ts b/src/shattered_sword/Scenes/GameLevel.ts index a56300c..6764f32 100644 --- a/src/shattered_sword/Scenes/GameLevel.ts +++ b/src/shattered_sword/Scenes/GameLevel.ts @@ -14,7 +14,6 @@ import Timer from "../../Wolfie2D/Timing/Timer"; import Color from "../../Wolfie2D/Utils/Color"; import { EaseFunctionType } from "../../Wolfie2D/Utils/EaseFunctions"; import PlayerController from "../Player/PlayerController"; -import MainMenu from "./MainMenu"; import { GameState, Player_Events, Statuses } from "../sword_enums"; import RegistryManager from "../../Wolfie2D/Registry/RegistryManager"; import WeaponType from "../GameSystems/items/WeaponTypes/WeaponType"; @@ -33,7 +32,6 @@ import Stack from "../../Wolfie2D/DataTypes/Stack"; import InputWrapper from "../Tools/InputWrapper"; import Story from "../Tools/DataTypes/Story"; import Sprite from "../../Wolfie2D/Nodes/Sprites/Sprite"; -import Platformer from "../../demos/Platformer"; import TextInput from "../../Wolfie2D/Nodes/UIElements/TextInput"; import { TiledTilemapData } from "../../Wolfie2D/DataTypes/Tilesets/TiledData"; import AttackAction from "../AI/EnemyActions/AttackAction"; @@ -135,7 +133,7 @@ export default class GameLevel extends Scene { protected endCheckPoint: Rect; protected touchedStartCheckPoint: boolean = false; protected touchedEndCheckPoint: boolean = false; - protected static gameTimer: number = 0; + static gameTimer: number = 0; protected gameStarted: boolean = false; protected timerLable: Label; protected levelEnded: boolean = false; diff --git a/src/shattered_sword/Scenes/MainMenu.ts b/src/shattered_sword/Scenes/MainMenu.ts index 6f8df29..ec94e06 100644 --- a/src/shattered_sword/Scenes/MainMenu.ts +++ b/src/shattered_sword/Scenes/MainMenu.ts @@ -11,6 +11,7 @@ import Layer from "../../Wolfie2D/Scene/Layer"; import Label from "../../Wolfie2D/Nodes/UIElements/Label"; import Levels from "./Levels"; import RandomMapGenerator from "../Tools/RandomMapGenerator"; +import GameLevel from "./GameLevel"; export default class MainMenu extends Scene { protected config: ConfigManager; @@ -30,6 +31,7 @@ export default class MainMenu extends Scene { //TODO startScene(): void{ + GameLevel.gameTimer = 0; const center = this.viewport.getCenter(); // The main menu