How to use the excalibur.Loader function in excalibur

To help you get started, we’ve selected a few excalibur examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github excaliburjs / example-ts-webpack / src / index.ts View on Github external
public start(loader: ex.Loader) {
    return super.start(loader);
  }
}

const game = new Game();
const levelOne = new LevelOne(game);
const player = new Player();
player.addDrawing(Resources.Sword);

levelOne.add(player);

game.add('levelOne', levelOne);


let loader = new ex.Loader();
for (let key in Resources) {
  loader.addResource(Resources[key]);
}

game.start(loader).then(() => {
  game.goToScene('levelOne');
});

excalibur

Excalibur.js is a simple JavaScript game engine with TypeScript bindings for making 2D games in HTML5 Canvas. Our mission is to make web game development as simple as possible.

BSD-2-Clause
Latest version published 7 months ago

Package Health Score

80 / 100
Full package analysis