Exemple #1
0
 public TroopPathFinder(Troop troop)
 {
     this.troop = troop;
     this.firstTierPathFinder                      = new TierPathFinder();
     this.secondTierPathFinder                     = new TierPathFinder();
     this.thirdTierPathFinder                      = new TierPathFinder();
     this.simplePathFinder                         = new TierPathFinder();
     this.movableAreaSearcher                      = new AreaSearcher();
     this.troopAreaSearcher                        = new AreaSearcher();
     this.conflictionPathSearcher                  = new PathSearcher();
     this.firstTierPathFinder.OnGetCost           += new TierPathFinder.GetCost(this.firstTierPathFinder_OnGetCost);
     this.firstTierPathFinder.OnGetPenalizedCost  += new TierPathFinder.GetPenalizedCost(this.firstTierPathFinder_OnGetPenalizedCost);
     this.secondTierPathFinder.OnGetCost          += new TierPathFinder.GetCost(this.secondTierPathFinder_OnGetCost);
     this.thirdTierPathFinder.OnGetCost           += new TierPathFinder.GetCost(this.thirdTierPathFinder_OnGetCost);
     this.simplePathFinder.OnGetCost              += new TierPathFinder.GetCost(this.simplePathFinder_OnGetCost);
     this.movableAreaSearcher.OnGetCost           += new AreaSearcher.GetCost(this.movableAreaSearcher_OnGetCost);
     this.movableAreaSearcher.OnCompare           += new AreaSearcher.Compare(this.movableAreaSearcher_OnCompare);
     this.troopAreaSearcher.OnGetCost             += new AreaSearcher.GetCost(this.troopAreaSearcher_OnGetCost);
     this.conflictionPathSearcher.OnCheckPosition += new PathSearcher.CheckPosition(this.conflictionPathSearcher_OnCheckPosition);
 }
 public TroopPathFinder(Troop troop)
 {
     this.troop = troop;
     this.firstTierPathFinder = new TierPathFinder();
     this.secondTierPathFinder = new TierPathFinder();
     this.thirdTierPathFinder = new TierPathFinder();
     this.simplePathFinder = new TierPathFinder();
     this.movableAreaSearcher = new AreaSearcher();
     this.troopAreaSearcher = new AreaSearcher();
     this.conflictionPathSearcher = new PathSearcher();
     this.firstTierPathFinder.OnGetCost += new TierPathFinder.GetCost(this.firstTierPathFinder_OnGetCost);
     this.firstTierPathFinder.OnGetPenalizedCost += new TierPathFinder.GetPenalizedCost(this.firstTierPathFinder_OnGetPenalizedCost);
     this.secondTierPathFinder.OnGetCost += new TierPathFinder.GetCost(this.secondTierPathFinder_OnGetCost);
     this.thirdTierPathFinder.OnGetCost += new TierPathFinder.GetCost(this.thirdTierPathFinder_OnGetCost);
     this.simplePathFinder.OnGetCost += new TierPathFinder.GetCost(this.simplePathFinder_OnGetCost);
     this.movableAreaSearcher.OnGetCost += new AreaSearcher.GetCost(this.movableAreaSearcher_OnGetCost);
     this.movableAreaSearcher.OnCompare += new AreaSearcher.Compare(this.movableAreaSearcher_OnCompare);
     this.troopAreaSearcher.OnGetCost += new AreaSearcher.GetCost(this.troopAreaSearcher_OnGetCost);
     this.conflictionPathSearcher.OnCheckPosition += new PathSearcher.CheckPosition(this.conflictionPathSearcher_OnCheckPosition);
 }