using UnityEngine;
using System.Collections;

public class PlayerWounded : MonoBehaviour {
    private GameManager gameManager;

    void Start() {
        gameManager = FindObjectOfType<GameManager>();
    }

    public void OnCollisionEnter(Collision collision) {
        if (collision.gameObject.tag == "Weapon") {
            Destroy(collision.gameObject);
            StartCoroutine(gameManager.decreaseHealth(1));
        }
    }
}
