public void gainexperience(float exp) { string todisplay = string.Format("Experience: {0}", exp); InstantiateFloatingText.DisplayTextOnScreen(todisplay); GetComponent <Properties>().experience = GetComponent <Properties>().experience + exp; }
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)); }
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)); }