예제 #1
0
    public void UnlockButtonAction()
    {
        if (GameDatas.HasAbility(selectedAbility.parentAbility) && GameDatas.BankAccount >= selectedAbility.cost)
        {
            GameDatas.SetAbility(selectedAbility.type, true);
            GameDatas.SpendMoney(selectedAbility.cost);

            UpdateAccounts();
            OnAbilityUnlock?.Invoke(selectedAbility.type);
        }
    }