// Use this for initialization void Start() { if (damageIndicator != null) { damageIndicator.SetDamage(value); } }
public static void SpawnHit(float x, float y, int damage) { DamageIndicator di = (DamageIndicator)Instantiate(instance.prefab_hit, new Vector3(x, y, -2), Quaternion.identity); di.SetDamage(damage); di.gameObject.SetActive(true); }