Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/excaliburjs/sample-platformer. Sample Platformer built in Excalibur excaliburjs.com/sample-platformer
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334import * as ex from 'excalibur';import { loader } from './resources';import { Level } from './level';
const engine = new ex.Engine({ backgroundColor: ex.Color.fromHex('#5fcde4'), width: 600, height: 400});
// Turn off anti-aliasing for pixel art graphicsengine.setAntialiasing(false);
// Set global gravity, 800 pixels/sec^2ex.Physics.acc = new ex.Vector(0, 800);
// Setup first level as a custom sceneengine.add('level', new Level(engine));engine.goToScene('level');
// Game events to handleengine.on('hidden', () => { console.log('pause'); engine.stop();});engine.on('visible', () => { console.log('start'); engine.start();});
// Start the engineengine.start(loader).then(() => { console.log('game start');});