public void Init(string s, int size, float t, Bowhead.Actors.Pawn target) { totalTime = time = t; text = GetComponent <UnityEngine.UI.Text>(); text.fontSize = size; text.color = Color.red; text.text = s; startPos = target.headPosition(); transform.position = Camera.main.WorldToScreenPoint(startPos); Destroy(gameObject, time); }
public void Init(float d, float t, Color c, Bowhead.Actors.Pawn target) { totalTime = time = t; text = GetComponent <UnityEngine.UI.Text>(); text.fontSize = (int)Mathf.Clamp(Mathf.Sqrt(d / 5) * 20, 20, 40); text.color = Color.red; text.text = Mathf.CeilToInt(d).ToString(); startPos = target.headPosition(); transform.position = Camera.main.WorldToScreenPoint(startPos); startColor = c; Destroy(gameObject, time); }
public void OnStatusEffectAdded(Bowhead.Actors.Pawn target, StatusEffect effect) { StatusEffectAddedEvent?.Invoke(target, effect); }
public void OnDamage(Bowhead.Actors.Pawn p, float d, bool directHit) { DamageEvent?.Invoke(p, d, directHit); }
public void SetTarget(Pawn p) { _target = p; }