You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

36 lines
762 B

  1. using System;
  2. using CIG.Translation;
  3. using SUISSEngine;
  4. using UnityEngine;
  5. public class BuyExpansionPopupView : PopupBaseView
  6. {
  7. public void SetPrice(Currencies price)
  8. {
  9. this._goldLabel.LocalizedString = Localization.Integer(price.GetValue("Gold"));
  10. this._cashLabel.LocalizedString = Localization.Integer(price.GetValue("Cash"));
  11. }
  12. public void OnBuyWithGoldClicked()
  13. {
  14. if (!base.PopupState.Closed)
  15. {
  16. ((BuyExpansionPopupState)this.State).BuyWith("Gold");
  17. }
  18. }
  19. public void OnBuyWithCashClicked()
  20. {
  21. if (!base.PopupState.Closed)
  22. {
  23. ((BuyExpansionPopupState)this.State).BuyWith("Cash");
  24. }
  25. }
  26. [SerializeField]
  27. private LocalizedText _cashLabel;
  28. [SerializeField]
  29. private LocalizedText _goldLabel;
  30. }