Planet.js 452 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
const schema = require("@colyseus/schema"),
    GameObject = require("./GameObject.js");

const DEFAULT_HEALTH = 100,
  DEFAULT_HIT_BOX_RADIUS = 270,
  DEFAULT_WIDTH = 500,
  DEFAULT_HEIGHT = 500;

class Planet extends GameObject {

  constructor(x, y) {
    super(x, y, DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_HIT_BOX_RADIUS,
      0, 0);
    this.lp = DEFAULT_HEALTH;
  }

}

schema.defineTypes(Planet, {
    lp: "number"
});

module.exports = Planet;