示例#1
0
 public PortalOptimizer()
 {
     pusher = new SquadPushPlugin(x =>
     {
         if (x is Wormhole w)
         {
             return(1);
         }
         return(0);
     }, true, (obj, attackers) => Bot.Engine.DefaultPush(obj, attackers, false));
 }
示例#2
0
 public PortalOptimizer(System.Func <Wormhole, Location> optimizer)
 {
     pusher = new SquadPushPlugin(x =>
     {
         if (x is Wormhole w)
         {
             return(1);
         }
         return(0);
     }, true, (obj, attackers) =>
     {
         if (obj is Wormhole w)
         {
             return(PushMapping.To(attackers, obj, optimizer(w)));
         }
         return(new PushMapping());
     });
 }