Skip to content

Commit

Permalink
adds game file and launch function
Browse files Browse the repository at this point in the history
  • Loading branch information
ceceliacreates committed Sep 5, 2023
1 parent ca9586f commit 2292267
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/game/game.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Game, AUTO, Scale} from "phaser";

export function launch() {
return new Game({
type: AUTO,
scale: {
mode: Scale.RESIZE,
width: window.innerWidth * window.devicePixelRatio,
autoCenter: Scale.CENTER_BOTH,
height: window.innerHeight * window.devicePixelRatio,
},
parent: "game",
backgroundColor: "#201726",
physics: {
default: "arcade",
},
scene: MainScene,
});
}

0 comments on commit 2292267

Please sign in to comment.