Ejemplo n.º 1
0
 public static void ConvertStarbuxToResources(PSItem item1, int amount1, PSItem item2, int amount2, int starbuxCost, Action <PSServerMessage> endAction)
 {
     if (starbuxCost <= UserManager.Starbux)
     {
         AlertController.ShowWaitPanel(SingletonManager <LocalizationManager> .Instance.GetLocalizedText("Please wait..."));
         SingletonManager <UserManager> .Instance.BuyItemsWithStarbux(item1.ItemDesignId, amount1, item2.ItemDesignId, amount2, endAction, (Action)(() => AlertController.HideWaitPanel()));
     }
     else
     {
         SharedManager.ShowInsufficientStarbuxDialogue(starbuxCost);
     }
 }
Ejemplo n.º 2
0
 public static void ConvertStarbuxToSupplies(int amount, int starbuxCost, Action <PSServerMessage> endAction)
 {
     if (starbuxCost <= UserManager.Starbux)
     {
         AlertController.ShowWaitPanel(SingletonManager <LocalizationManager> .Instance.GetLocalizedText("Please wait..."));
         SingletonManager <UserManager> .Instance.BuySuppliesWithStarbux(amount, endAction, (Action)(() => AlertController.HideWaitPanel()));
     }
     else
     {
         SharedManager.ShowInsufficientStarbuxDialogue(starbuxCost);
     }
 }