TsarBot/role_base.js

14 lines
287 B
JavaScript

class roleBase{
static body = [ MOVE, WORK, CARRY ];
static name = 'Creep';
/** @param {Creep} creep **/
run(creep) { }
static spawn(spawnPoint){
spawnPoint.spawnCreep(this.body, this.name + Game.time,
{memory : {role : this.name}
});
}
};
module.exports = roleBase;