Exemplo n.º 1
0
    /// <summary>
    /// Transfers the amount in the textfield from the treasure to the player.
    /// </summary>
    public void TransferMoney()
    {
        int amount;

        int.TryParse(m_Input.text, out amount);
        if (m_CurrentTreasure.IsMoneyTranferValid(amount))
        {
#if (UNITY_EDITOR)
            Debug.Log("Valid Transaction");
#endif
            GameManager.s_Singleton.Player.Person.TreasureTransaction(amount, false);
        }
        UpdateUI();
    }