mobile.js 364 B

12345678910111213141516171819
  1. function Mobile() {
  2. this.id = 0;
  3. this.position = {x: 0, y: 0};
  4. this.targetPosition = {x: 0, y: 0};
  5. this.width = 32;
  6. this.height = 32;
  7. this.maxSpeed = 2;
  8. this.turnRate = Math.PI / 64;
  9. this.targetAngle = 0;
  10. this.angleRadians = 0;
  11. this.color = "crimson";
  12. this.sprite = "human1";
  13. this.name = "Mobile";
  14. this.type = "player";
  15. };
  16. module.exports = Mobile;