public Unit(SWIG.BWAPI.Unit u) { theUnit = u; Type = u.getType().getName(); Id = u.getID(); Alive = true; theTarget = null; }
public void Attack(SWIG.BWAPI.Unit t) { if (t == null && theTarget != null) { theUnit.stop(); theTarget = null; } else if (t != null && t != theTarget) { theTarget = t; theUnit.attackUnit(theTarget); } }
public void Gather(SWIG.BWAPI.Unit t) { if (t == null && theTarget != null) { theUnit.stop(); theTarget = null; } else if (t != null) { theTarget = t; theUnit.gather(theTarget); } }
public Unit(SWIG.BWAPI.Unit u) { theUnit = u; theTarget = null; }
protected static int TotalUnitLossScore(SWIG.BWAPI.UnitType unitType) { return SWIG.BWAPI.bwapi.Broodwar.self().deadUnitCount(unitType) * unitType.destroyScore(); }
protected static int TotalUnitBuildScore(SWIG.BWAPI.UnitType unitType) { return TotalUnitBuildCount(unitType) * unitType.buildScore(); }
protected static int TotalUnitBuildCount(SWIG.BWAPI.UnitType unitType) { return SWIG.BWAPI.bwapi.Broodwar.self().completedUnitCount(unitType) + SWIG.BWAPI.bwapi.Broodwar.self().deadUnitCount(unitType); }