added splash screen
This commit is contained in:
parent
036f5a87ba
commit
a03c33d07c
|
@ -4,7 +4,7 @@ import MainMenu from "./shattered_sword/Scenes/MainMenu";
|
|||
import RegistryManager from "./Wolfie2D/Registry/RegistryManager";
|
||||
import WeaponTemplateRegistry from "./shattered_sword/Registry/WeaponRegistry";
|
||||
import WeaponTypeRegistry from "./shattered_sword/Registry/WeaponTypeRegistry";
|
||||
|
||||
import SplashScreen from "./shattered_sword/Scenes/SplashScreen";
|
||||
// The main function is your entrypoint into Wolfie2D. Specify your first scene and any options here.
|
||||
(function main(){
|
||||
// Run any tests
|
||||
|
@ -47,7 +47,7 @@ import WeaponTypeRegistry from "./shattered_sword/Registry/WeaponTypeRegistry";
|
|||
const game = new Game(options);
|
||||
|
||||
// Start our game
|
||||
game.start(MainMenu, {});
|
||||
game.start(SplashScreen, {});
|
||||
//TODO - change to splash screen once available
|
||||
//game.start(SplashScreen,{});
|
||||
})();
|
||||
|
|
|
@ -11,9 +11,9 @@ import Layer from "../../Wolfie2D/Scene/Layer";
|
|||
import Label from "../../Wolfie2D/Nodes/UIElements/Label";
|
||||
import Levels from "./Levels";
|
||||
import InputWrapper from "../Tools/InputWrapper";
|
||||
import MainMenu from "./MainMenu";
|
||||
|
||||
|
||||
export default class MainMenu extends Scene {
|
||||
export default class SplashScreen extends Scene {
|
||||
protected config: ConfigManager;
|
||||
protected save: SaveManager;
|
||||
|
||||
|
@ -22,8 +22,8 @@ export default class MainMenu extends Scene {
|
|||
|
||||
loadScene(): void {
|
||||
//load images
|
||||
//this.load.image("logo", "shattered_sword_assets/images/Shattered_Sword_Logo.png");
|
||||
//this.load.image("backgroundImage", "shattered_sword_assets/images/Background.png");
|
||||
this.load.image("logo", "shattered_sword_assets/images/black.png");
|
||||
this.load.image("backgroundImage", "shattered_sword_assets/images/logo.png");
|
||||
// Load the menu song
|
||||
//this.load.audio("menu", "assets/music/menu.mp3");
|
||||
}
|
||||
|
@ -70,6 +70,10 @@ export default class MainMenu extends Scene {
|
|||
|
||||
|
||||
updateScene(){
|
||||
if (InputWrapper.isLeftMouseJustPressed()) { //if left click
|
||||
this.sceneManager.changeToScene(MainMenu, {}, {});
|
||||
|
||||
}
|
||||
while(this.receiver.hasNextEvent()){
|
||||
let event = this.receiver.getNextEvent();
|
||||
console.log(event);
|
||||
|
|
Loading…
Reference in New Issue
Block a user