예제 #1
0
 public void itensRefresh()
 {
     BkgMana.GetComponent <Image>().fillAmount = magic / 100;
     BkgVida.GetComponent <Image>().fillAmount = life / 100;
     txtMP.text     = "x " + potionsMP;
     txtHP.text     = "x " + potionsHP;
     hudMP.text     = potionsMP.ToString();
     hudHP.text     = potionsHP.ToString();
     lifeTxt.text   = life.ToString();
     magicTxt.text  = magic.ToString();
     actionTxt.text = actionPoints.ToString();
     SendStatus();
 }
    // Update is called once per frame
    void Update()
    {
        BkgMana.GetComponent <Image> ().fillAmount = mana / 100;
        BkgVida.GetComponent <Image> ().fillAmount = vida / 100;

        vidaText.GetComponent <Text>().text       = vida.ToString();
        manaText.GetComponent <Text>().text       = mana.ToString();
        potionVidaText.GetComponent <Text>().text = pocoesVida.ToString();
        potionManaText.GetComponent <Text>().text = pocoesMana.ToString();
        goldText.GetComponent <Text>().text       = gold.ToString();

        if (arma == 1)
        {
            //animacao jogador com arma 1
            //acoes  arma 1
        }

        if (arma == 2)
        {
            //animacao jogador com arma 2
            //acoes  arma 2
        }
    }