public static AbilityPopup Create(Vector3 position, string ability) { Transform abilityPopupTransform = Instantiate(GameAssets.i.pfAbilityPopup, position, Quaternion.identity); AbilityPopup abilityPopup = abilityPopupTransform.GetComponent <AbilityPopup>(); abilityPopup.Setup(ability); return(abilityPopup); }
void IncreaseHealth(int hel) { currentHealth += hel; healthBar.SetValue(currentHealth); AbilityPopup.Create(GameObject.Find("cyborgman").transform.position, "Rifle Blast"); }