Beispiel #1
0
    protected override void OnPicked(Collider other)
    {
        base.OnPicked(other);
        HealtManager healtManager = other.GetComponent <HealtManager>();

        if (!healtManager)
        {
            return;
        }

        healtManager.Heal(healAmount);
        Destroy(gameObject);
    }
Beispiel #2
0
 // Start is called before the first frame update
 void Start()
 {
     healthManager = GetComponent <HealtManager>();
 }