我在哪里可以找到Game
对象的常量列表,例如Game.HOSTILE_CREEPS
,Game.MOVE
和Game.ATTACK
?
答案 0 :(得分:5)
可以在the game docs(页面底部)找到它们
<强> 常量 强>
结果代码
Game.OK
0 Game.ERR_NOT_OWNER
-1 Game.ERR_NO_PATH
-2 Game.ERR_NAME_EXISTS
-3 Game.ERR_BUSY
-4 Game.ERR_NOT_FOUND
-5 Game.ERR_NOT_ENOUGH_ENERGY
-6 Game.ERR_INVALID_TARGET
-7 Game.ERR_FULL
-8 Game.ERR_NOT_IN_RANGE
-9 Game.ERR_INVALID_ARGS
-10 Game.ERR_TIRED
-11 Game.ERR_NO_BODYPART
-12 Game.ERR_NOT_ENOUGH_EXTENSIONS
-13 Room.find()常量
Game.CREEPS
1 Game.MY_CREEPS
2 Game.HOSTILE_CREEPS
3 Game.SOURCES_ACTIVE
4 Game.SOURCES
5 Game.DROPPED_ENERGY
6 Game.STRUCTURES
7 Game.MY_STRUCTURES
8 Game.HOSTILE_STRUCTURES
9 Game.FLAGS
10 Game.CONSTRUCTION_SITES
11 Game.MY_SPAWNS
12 Game.HOSTILE_SPAWNS
13 Game.EXIT_TOP
14 Game.EXIT_RIGHT
15 Game.EXIT_BOTTOM
16 Game.EXIT_LEFT
17 路线强>
Game.TOP
1 Game.TOP_RIGHT
2 Game.RIGHT
3 Game.BOTTOM_RIGHT
4 Game.BOTTOM
5 Game.BOTTOM_LEFT
6 Game.LEFT
7 Game.TOP_LEFT
8 身体部位
Game.MOVE
“移动”Game.WORK
“工作”Game.CARRY
“携带”Game.ATTACK
“攻击”Game.RANGED_ATTACK
“ranged_attack”Game.TOUGH
“强硬”Game.HEAL
“治愈”结构类型
Game.STRUCTURE_EXTENSION
“extension”Game.STRUCTURE_RAMPART
“rampart”Game.STRUCTURE_ROAD
“road”Game.STRUCTURE_SPAWN
“spawn”Game.STRUCTURE_WALL
“constructWall”<强>颜色强>
Game.COLOR_RED
“red”Game.COLOR_PURPLE
“purple”Game.COLOR_BLUE
“blue”Game.COLOR_CYAN
“青色”Game.COLOR_GREEN
“green”Game.COLOR_YELLOW
“黄色”Game.COLOR_ORANGE
“orange”Game.COLOR_BROWN
“brown”Game.COLOR_GREY
“灰色”Game.COLOR_WHITE
“white”会议室模式
Game.MODE_SIMULATION
“模拟”Game.MODE_SURVIVAL
“生存”Game.MODE_WORLD
“世界”答案 1 :(得分:3)
取决于您的需求:
答案 2 :(得分:0)