using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class LifeObject : MonoBehaviour {

    public int value;

    private void OnTriggerEnter (Collider other) {
        if (other.tag == "Player") {
            other.GetComponent<playerctrl>().Healed(value);
            Destroy(this.gameObject);
        }
    }

}
