1
我想讓自己修復一下,但下面的代碼似乎不起作用。有什麼建議麼?自我修復
module.exports = function(creep) {
var targets = creep.room.find(Game.HOSTILE_CREEPS);
if(targets.length) {
creep.rangedAttack(targets[0]);
}
if(creep.hits < creep.hitsMax) {
creep.heal(creep);
console.log("healing")
}}
是否Console.log(「癒合」)實際上被調用? – user2813274 2014-12-04 23:37:18
它確實顯示在控制檯中,所以是 – user3885824 2014-12-04 23:39:50
只是點擊數保持不變 – user3885824 2014-12-04 23:42:23