Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Troop {
- constructor(x, y, side, color) {
- this.id = Math.random();
- this.health = 100;
- this.maxHealth = 100;
- this.attackCycle = 90;
- this.neededAttackCycle = 90;
- this.range = 36;
- this.attack = 20;
- this.radius = 16;
- this.canMove = false;
- this.side = side;
- this.color = color;
- this.x = x;
- this.y = y;
- }
- setPosition(x, y) {
- this.x = x;
- this.y = y;
- }
- }
- module.exports.Troop = Troop;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement