예제 #1
0
 public static Composite GrabItem(ItemToGrabFromStashDelegate itemToGrabFromStashDelegate)
 {
     return(new Sequence(
                TownBehavior.OpenStash(),
                StashBehavior.SwitchToTab(x => itemToGrabFromStashDelegate(x).stashIndex),
                MoveItemFromStashToInventory(itemToGrabFromStashDelegate),
                new Action(delegate
     {
         Thread.Sleep(100);
         currentItemToGrab = null;
         return RunStatus.Success;
     })
                ));
 }
예제 #2
0
 public static Composite DoChaosRecipeStashesInit()
 {
     return(new Decorator(delegate
     {
         GetIndexesOfCrStashTabs();
         if (hasOpenedCrStashTabs == false)
         {
             return true;
         }
         return false;
     }, new Sequence(
                              TownBehavior.OpenStash(),
                              StashBehavior.SwitchToTab(x => chaosRecipeStashTabIndexes[0]),
                              StashBehavior.SwitchToTab(x => chaosRecipeStashTabIndexes[1]),
                              StashBehavior.SwitchToTab(x => chaosRecipeStashTabIndexes[2]),
                              StashBehavior.SwitchToTab(x => chaosRecipeStashTabIndexes[3]),
                              new Action(delegate
     {
         hasOpenedCrStashTabs = true;
         return RunStatus.Success;
     })
                              )
                          ));
 }