Esempio n. 1
0
 void  BuildExtractor( int constructorid )
 {
     IUnitDef unitdef = buildtable.UnitDefByName[ BuildTable.ArmMex ] as IUnitDef;;
     Float3 constructorpos = aicallback.GetUnitPos( constructorid );
     Float3 nearestmetalpos = metal.GetNearestMetalSpot( constructorpos );
     logfile.WriteLine( "BuildExtractor nearestmetalpos is null? " + ( nearestmetalpos == null ).ToString() );
     Float3 buildsite = aicallback.ClosestBuildSite( unitdef, nearestmetalpos, 1400.0, 2 );        
     BuildAt( constructorid, unitdef, buildsite );
 }
        public void  CommanderBuildExtractor()
        {
            IUnitDef unitdef         = buildtable.UnitDefByName["armmex"] as IUnitDef;;
            Float3   commanderpos    = aicallback.GetUnitPos(commanderid);
            Float3   nearestmetalpos = metal.GetNearestMetalSpot(commanderpos);

            logfile.WriteLine("CommanderBuildExtractor nearestmetalpos is null? " + (nearestmetalpos == null).ToString());
            //Float3 nearestmetalpos = metalspot.Pos;
            Float3 buildsite = aicallback.ClosestBuildSite(unitdef, nearestmetalpos, 1400.0, 2);

            CommanderBuildAt(unitdef, buildsite);
            // metal.MarkMetalSpotUsed( metalspot );
        }