// Use this for initialization void Start() { _chargeablePanel = gameObject.GetComponent <ChargeablePanel>(); MainCharacter mainCharacter = Manager.Instance.Object.MainCharacter; mainCharacter.MoneyChangeEvent.Attach(onMoneyChanged); int money = mainCharacter.Money; _chargeablePanel.SetText(get(money)); _chargeablePanel.AddClickListener(onClickCharge); }
// Use this for initialization void Start() { _chargeablePanel = gameObject.GetComponent <ChargeablePanel>(); _chargeablePanel.AddClickListener(onClickCharge); }