Exemplo n.º 1
0
    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);
    }
Exemplo n.º 2
0
    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);
    }
Exemplo n.º 3
0
 public void OnStatusEffectAdded(Bowhead.Actors.Pawn target, StatusEffect effect)
 {
     StatusEffectAddedEvent?.Invoke(target, effect);
 }
Exemplo n.º 4
0
 public void OnDamage(Bowhead.Actors.Pawn p, float d, bool directHit)
 {
     DamageEvent?.Invoke(p, d, directHit);
 }
Exemplo n.º 5
0
 public void SetTarget(Pawn p)
 {
     _target = p;
 }