// CONSTRUCTOR & UPDATER: ----------------------------------------------------------------- public override void Setup(MerchantUIManager merchantUIManager, params object[] parameters) { base.Setup(merchantUIManager, parameters); this.ware = parameters[0] as Merchant.Ware; this.UpdateUI(); }
// CONSTRUCTOR & UPDATER: ----------------------------------------------------------------- public override void Setup(MerchantUIManager merchantUIManager, params object[] parameters) { base.Setup(merchantUIManager, parameters); this.item = parameters[0] as Item; this.UpdateUI(); }
// INITIALIZERS: -------------------------------------------------------------------------- private void Awake() { MerchantUIManager.Instance = this; this.merchantItems = new Dictionary <int, MerchantUIItemSeller>(); this.playerItems = new Dictionary <int, MerchantUIItemPlayer>(); if (transform.childCount >= 1) { this.merchantRoot = transform.GetChild(0).gameObject; this.merchantAnimator = this.merchantRoot.GetComponent <Animator>(); } }
// EXECUTABLE: ------------------------------------------------------------------------------------------------- public override bool InstantExecute(GameObject target, IAction[] actions, int index) { if (this.actionType == ACTION_TYPE.Open) { MerchantUIManager.OpenMerchant(this.merchant); } if (this.actionType == ACTION_TYPE.Close) { MerchantUIManager.CloseMerchant(); } return(true); }
public override bool Check(GameObject target) { switch (this.merchant) { case State.IsOpen: return(MerchantUIManager.IsMerchantOpen()); case State.IsClosed: return(!MerchantUIManager.IsMerchantOpen()); } return(false); }
// INITIALIZERS: -------------------------------------------------------------------------- private void Awake() { MerchantUIManager.Instance = this; this.merchantItems = new Dictionary <int, MerchantUIItem>(); if (this.container == null) { this.container.GetComponentInChildren <ScrollRect>(); } if (transform.childCount >= 1) { this.merchantRoot = transform.GetChild(0).gameObject; this.merchantAnimator = this.merchantRoot.GetComponent <Animator>(); } }
// CONSTRUCTOR & UPDATER: ----------------------------------------------------------------- public virtual void Setup(MerchantUIManager merchantUIManager, params object[] parameters) { this.merchantUIManager = merchantUIManager; }
// STATIC METHODS: ------------------------------------------------------------------------ public static void OpenMerchant(Merchant merchant) { MerchantUIManager.RequireInstance(merchant); MerchantUIManager.Instance.Open(merchant); }
// CONSTRUCTOR & UPDATER: ----------------------------------------------------------------- public void Setup(Merchant.Ware ware, MerchantUIManager merchantUIManager) { this.merchantUIManager = merchantUIManager; this.UpdateUI(ware); }
public static void CloseMerchant() { MerchantUIManager.RequireInstance(null); MerchantUIManager.Instance.Close(); }