using UnityEngine;
using System.Collections;

public class Chomper : MonoBehaviour {


    public bool chomping = false;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}

    void OnTriggerStay(Collider other) {
        if (other.tag == "Enemy" && chomping) {
            EnemyHealth eh = other.GetComponent<EnemyHealth>();
            eh.damage(10);
        }
    }
}
