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

public class CantidadPolicias : MonoBehaviour {

    public int cantPolicias = 0;
    public Text texto;

    // Use this for initialization
    void Start() {
    }

    // Update is called once per frame
    void Update() {
        texto.text = "Cantidad de Policias " + cantPolicias/2;
    }

    private void OnTriggerEnter(Collider vCollider)
    {
        if (vCollider.gameObject.tag == "Enemy")
        {
            cantPolicias++;
        }
    }
    private void OnTriggerExit(Collider vCollider)
    {
        if (vCollider.gameObject.tag == "Enemy")
        {
            cantPolicias --;
        }
    }
}
