Ejemplo n.º 1
0
 public Unit(SWIG.BWAPI.Unit u)
 {
     theUnit = u;
     Type = u.getType().getName();
     Id = u.getID();
     Alive = true;
     theTarget = null;
 }
Ejemplo n.º 2
0
        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);
			}
		}
Ejemplo n.º 3
0
 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);                
     }
 }
Ejemplo n.º 4
0
		public Unit(SWIG.BWAPI.Unit u)
		{
			theUnit = u;
			theTarget = null;
		}
Ejemplo n.º 5
0
 protected static int TotalUnitLossScore(SWIG.BWAPI.UnitType unitType)
 {
     return SWIG.BWAPI.bwapi.Broodwar.self().deadUnitCount(unitType) * unitType.destroyScore();
 }
Ejemplo n.º 6
0
 protected static int TotalUnitBuildScore(SWIG.BWAPI.UnitType unitType)
 {
     return TotalUnitBuildCount(unitType) * unitType.buildScore();
 }
Ejemplo n.º 7
0
 protected static int TotalUnitBuildCount(SWIG.BWAPI.UnitType unitType)
 {
     return SWIG.BWAPI.bwapi.Broodwar.self().completedUnitCount(unitType) + SWIG.BWAPI.bwapi.Broodwar.self().deadUnitCount(unitType);
 }