コード例 #1
0
    // 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);
    }
コード例 #2
0
 private void onMoneyChanged(int money)
 {
     _chargeablePanel.SetText(get(money));
 }