- stand 不移动 0
- moveGround 地面移动 1
- moveFly 飞行 2
- moveBounce 跳跃 3
- moveDig 地下 4
- destroyed 摧毁 -1
- unDeployed 未部署 0
- deployed 已部署 1
- free 自由 0
- searching 搜索目标中 1
- moving 移动中 2
- attacking 攻击中 3
- wallAttacking 攻击围墙 4 (攻击围墙状态的单位可随时触发搜索目标)
- wall 围墙 1
- trainStructure 训练建筑 2
- resource 资源建筑 3
- groundDefense 地面防御 4
- airDefense 空中防御 5
- normalAtk 普通攻击 0
- rangeAtk 溅射攻击 1
- 功能: 初始化对战
- 参数:
- size: 地图大小
- buildingSize:防御建筑数目
- 返回值:
- battle index
- 功能: 获取对战对象
- 参数:
- index: battle index
- buildingSize:防御建筑数目
- 返回值:
- battle 对象
AddAttacker(x, y, atkRange, damage, deathDamage int, atkTypeInt int, atkPriorityInt int, suicideInt int) int
- 功能: 加载攻击单位
- 参数:
- x: x坐标
- y: y坐标
- atkRange: 攻击距离
- damage: 单位时间伤害
- deathDamage: 死亡时伤害
- atkTypeInt: AtkType
- atkPriorityInt: DefenderType
- suicideInt: 0-普通 1-自杀攻击
- 返回值:
- 对应battle中的 attacker index
- 功能: 加载防御单位
- 参数:
- xMin: 左上角x坐标
- yMin: 左上角y坐标
- dSize: 实体大小
- damage: 单位时间伤害
- atkRange: 攻击距离
- health: 生命值
- defenderType: DefenderType
- 返回值:
- 对应battle中的 defender index
- 功能: 获取对战攻击单位
- 参数:
- attackerIndex: attacker index
- 返回值:
- 对应battle中attacker对象
- 功能: 获取对战防御单位
- 参数:
- defenderIndex: defender index
- 返回值:
- 对应battle中defender对象
- 功能: 对战状态更新
- 参数:
- 返回值:
- 功能:执行移动操作
- 功能:执行攻击操作
- 功能:执行巡路操作
- 功能:获取attacker index
- 返回值:
- 对应battle中attacker index
- 功能:获取对战
- 返回值:
- battle对象
- 功能:获取当前目标
- 返回值:
- 对应battle中defender index
- 功能:获取生存状态
- 返回值:
- LivingStatus
- 功能:获取攻击状态
- 返回值:
- AtkStatus
- 功能:获取子坐标
- 返回值:
- x, y
- 功能:获取坐标
- 返回值:
- x, y
- 功能:执行攻击操作
- 功能:执行巡路操作
- 功能:获取defender index
- 返回值:
- 对应battle中defender index
- 功能:获取对战
- 返回值:
- battle对象
- 功能:获取当前目标
- 返回值:
- 对应battle中attacker index
- 功能:获取生存状态
- 返回值:
- LivingStatus
- 功能:获取攻击状态
- 返回值:
- AtkStatus
- 功能:获取最小x坐标
- 返回值:
- 坐标
- 功能:获取最大x坐标
- 返回值:
- 坐标
- 功能:获取最小y坐标
- 返回值:
- 坐标
- 功能:获取最大y坐标
- 返回值:
- 坐标