public void AddDamageIndicator(Vector3 ShotFirePosition, float Damage) { DamageIndicator Indicator = DamageIndicatorScene.Instance() as DamageIndicator; Indicator.Setup(ShotFirePosition, Damage * DamageIndicatorLifeMultiplyer); DamageIndicatorRoot.AddChild(Indicator); }
public static DamageIndicator Create(Vector3 position, float damage) { Transform damageIndicatorTransform = Instantiate(GameAssets.i.damageIndicator, position, Quaternion.identity); DamageIndicator damageIndicator = damageIndicatorTransform.GetComponent <DamageIndicator>(); damageIndicator.Setup(damage); return(damageIndicator); }