ShatteredSword/src/main.ts

40 lines
1.5 KiB
TypeScript
Raw Normal View History

import Game from "./Wolfie2D/Loop/Game";
2022-03-31 20:52:05 -04:00
import MainMenu from "./shattered_sword/Scenes/MainMenu";
2020-08-03 16:51:20 -04:00
// The main function is your entrypoint into Wolfie2D. Specify your first scene and any options here.
(function main(){
// Run any tests
runTests();
// Set up options for our game
let options = {
canvasSize: {x: 1200, y: 800}, // The size of the game
clearColor: {r: 0, g: 0, b: 0}, // The color the game clears to
inputs: [
{name: "left", keys: ["a"]}, //TODO - add arrow keys
{name: "right", keys: ["d"]},
{name: "up", keys: ["w"]},
{name: "down", keys: ["s"]},
{name: "jump", keys: ["x","space"]},
{name: "attack", keys: ["j","z","enter"]},
{name: "dash", keys: ["k","z"]},
{name: "skill", keys: ["l","v"]},
{name: "inventory", keys: ["i","b"]},
{name: "pause", keys: ["escape"]},
{name: "tab", keys: ["tab"]}
],
2022-03-31 20:52:05 -04:00
useWebGL: false, // Tell the game we want to use webgl
showDebug: true // Whether to show debug messages. You can change this to true if you want
}
2021-02-15 19:44:47 -05:00
// Create a game with the options specified
const game = new Game(options);
2020-08-03 16:51:20 -04:00
2021-02-15 19:44:47 -05:00
// Start our game
game.start(MainMenu, {});
//TODO - change to splash screen once available
//game.start(SplashScreen,{});
})();
function runTests(){};