示例#1
0
 public static void fight(AIDelegate aiDelegate, CachedUnit unit, AIFloat3 pos, boolean queue) {
   AICommand command =
       new FightUnitAICommand(
           unit.getUnitId(), -1, queue ? queueOption : 0, commandTimeout.getValue(), pos);
   try {
     handleCommand(aiDelegate, command);
   } catch (Exception e) {
     System.err.println(unit.getDef().getHumanName() + "::" + FormatUtil.formatAIFloat3(pos));
   }
 }
示例#2
0
 public static void attack(
     AIDelegate aiDelegate, CachedUnit unit, CachedUnit attackUnit, boolean queue) {
   AICommand command =
       new AttackUnitAICommand(
           unit.getUnitId(),
           -1,
           queue ? queueOption : 0,
           commandTimeout.getValue(),
           attackUnit.getUnitId());
   try {
     handleCommand(aiDelegate, command);
   } catch (Exception e) {
     System.err.println(unit.getDef().getHumanName() + ", " + attackUnit.getUnitId());
   }
 }