1.2.5 • Published 4 years ago

canvas-game-example-the-tanks v1.2.5

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago
import { Game } from 'canvas-game-example-the-tanks';

const game: Game = new Game({
  dynamicItemsMaxCount: 6,
  staticItemsMaxCount: 30,
  fps: 50,
  addEnemyThresholdMs: 5000,
  addStaticItemThresholdMs: 1000,
  playerHealth: 500,
  gameOverHandler: () => {
    // Handle game over
  }
});
const canvas = document.getElementById('canvasId');
game.init(canvas).start();

// You have access to player health and weapon like: 
// game.player.health, game.player.weapons

WSDA - move

left click - fire

Q (scroll) - switch weapon

T - teleportation to mouse position

See example at https://paul-lazunko.github.io/

1.2.5

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.0

4 years ago

1.2.1

4 years ago

1.1.0

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago