Beispiel #1
0
    public void gainexperience(float exp)
    {
        string todisplay = string.Format("Experience: {0}", exp);

        InstantiateFloatingText.DisplayTextOnScreen(todisplay);
        GetComponent <Properties>().experience = GetComponent <Properties>().experience + exp;
    }
Beispiel #2
0
    public void damage(float damage, GameObject DamagedBy)
    {//Function responsible for handling damage, and setting the appropriate animators and display text.
        string todisplay = string.Format(" - {0} ", damage);

        InstantiateFloatingText.DisplayDamageOnScreen(todisplay);
        //Display damage on screen of player.

        StartCoroutine(c_damage(damage, DamagedBy));
    }
Beispiel #3
0
 public void damage(float damage, GameObject DamagedBy)
 {//Function responsible for handling damage, and setting the appropriate animators and display text.
     InstantiateFloatingText.DisplayDamage(this.gameObject, DamagedBy, damage);
     //Instantiate the floating text which displays damage.
     StartCoroutine(c_damage(damage, DamagedBy));
 }