Esempio n. 1
0
 public void onUnitShow(Unit unit)
 {
     if (unit.getPlayer().isEnemy(bwapi.Broodwar.self()))
     {
         DecisionMaker.onEnemyShown(unit);                
     }
     if (unit.getType().getName() == "Resource Mineral Field")
     {
         DecisionMaker.onfoundMinerals(new BW.Unit(unit));
     }
     if (DecisionMaker.AIState.ToString() != "PreInitialize")
     {
         // PrintMessage("Unit Shown: [" + unit.getType().getName() + "] at [" + unit.getPosition().xConst() + "," + unit.getPosition().yConst() + "]");
     }
 }
Esempio n. 2
0
 public void onUnitMorph(Unit unit)
 {
     if (unit.getPlayer() == bwapi.Broodwar.self())
     {
         if (DecisionMaker.AIState.ToString() != "PreInitialize")
         {
             // PrintMessage("Unit Created: [" + unit.getType().getName() + "] at [" + unit.getPosition().xConst() + "," + unit.getPosition().yConst() + "]");
         }
         DecisionMaker.onMyUnitMorph(unit);
     }
 }
Esempio n. 3
0
 public void onUnitComplete(Unit unit)
 {
     if (unit.getPlayer() == bwapi.Broodwar.self())
     {
         if (DecisionMaker.AIState.ToString() != "PreInitialize")
         {
             // PrintMessage("Unit Completed: [" + unit.getType().getName() + "] at [" + unit.getPosition().xConst() + "," + unit.getPosition().yConst() + "]");
         }
         DecisionMaker.onMyUnitCompleted(unit);
     }
     var actual_type = unit.getType();
     // Console.WriteLine(actual_type.getName());
 }
Esempio n. 4
0
 public void onUnitDestroy(Unit unit)
 {
     if (unit.getPlayer() == bwapi.Broodwar.self())
     {
         DecisionMaker.onMyUnitDestroyed(unit);
     }            
     Console.WriteLine("destroyed");
 }