似乎只有两种类型的地形(到目前为止),平原和沼泽。除了对地图上的每个方格使用 Room.lookAt(x,y) 之外,还有什么方法可以找到所有的沼泽方格?
问问题
800 次
2 回答
3
你可以使用Room.lookForAtArea
这样的方法:
var terrain = creep.room.lookForAtArea('terrain', 0, 0, 49, 49);
terrain[5][10] == 'plain'; // tile at y=5 x=10 is plain land
terrain[25][40] == 'swamp'; // tile at y=25 x=40 is a swamp
于 2015-05-05T06:17:39.007 回答