How to use the phaser-ce.Keyboard.K function in phaser-ce

To help you get started, we’ve selected a few phaser-ce 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 amaccann / phaser-navmesh-generation / src / demo / demoState.js View on Github external
this.drawAllGround();
    this.drawInitGrid();
    this.updateNavMesh();

    game.input.addMoveCallback(this.updateMarker, this);
    game.input.onUp.add(this.onUp, this);
    game.canvas.oncontextmenu = this.onRightClick;

    this.cursors = game.input.keyboard.createCursorKeys();
    this.isSpriteStamp = false;
    this.spriteUUIDs = [];
    game.input.keyboard.addKey(Keyboard.P).onDown.add(() => game.paused = !game.paused, this);
    game.input.keyboard.addKey(Keyboard.SPACEBAR).onDown.add(() => game.paused = !game.paused, this);
    game.input.keyboard.addKey(Keyboard.S).onDown.add(() => this.isSpriteStamp = !this.isSpriteStamp);
    game.input.keyboard.addKey(Keyboard.K).onDown.add(() => this.removeSprite());

    this.spriteGroup = new Phaser.Group(game);

    new DemoSprite(game, 200, 500, this.spriteGroup, this.tileLayer);
  }

phaser-ce

Phaser CE (Community Edition) is a fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.

MIT
Latest version published 2 years ago

Package Health Score

59 / 100
Full package analysis