public AccuracyCalculator myAcc;//provides access to the functions and data of the accuracy calculator script

    public void UpdateDamage()
    {
        if (isDamaging == true)                                              //only occurs if data works
        {
            playerDamage = playerDamage + 0.01f;                             //slowly increments the damage
        }
        checkDamage.text = isDamaging.ToString();                            //updates the UI to show whether or not the player should be taking damage.
        damageText.text  = "Damage: [" + playerDamage.ToString("0.0") + "]"; //updates the text connected to this controller, as a float
        myAcc.UpdateAcc();                                                   //call to update the accuracy
    }
示例#2
0
 public void UpdateDamage()
 {
     damageText.text = "Damage: [" + playerDamage.ToString("0.0") + "]";//updates the text connected to this controller, as a float
     myAcc.UpdateAcc();
 }