Example #1
0
    public void pagarDivida()
    {
        Divida scriptDivida = GameObject.Find("Financeiro").GetComponent <Financeiro>().divida.gameObject.GetComponent <Divida>();

        Dinheiro.Descontar(scriptDivida.obterTotal());

        foreach (GameObject divida in GameObject.FindGameObjectsWithTag("Divida"))
        {
            if (divida.GetComponent <Toggle>().isOn)
            {
                Destroy(divida.gameObject);
            }
        }

        scriptDivida.zerarTotal();
        scriptDivida.aplicarTotal();
    }
Example #2
0
 public void pagarConta()
 {
     Dinheiro.Descontar(valorDivida);
     valorDivida = 0;
     this.abrir();
 }