using UnityEngine;
using System.Collections;

namespace UnityStandardAssets._2D
{
	public class Simbolo : MonoBehaviour {
		public int yo;
		public int miTipo;
		// Use this for initialization
		void Start () {
		
		}
		
		// Update is called once per frame
		void Update () {
		
		}

		void OnTriggerEnter2D(Collider2D other) {
			if (other.CompareTag ("jugadorGGJ")) {
				SelectorPersonajes p =	other.transform.GetComponent<SelectorPersonajes> ();
				if (p != null) {
					if (p.tipoActual == miTipo) {
						p.setSimbolo (yo);
						Destroy (gameObject);
					}
				}
			}
		} 
	}
}
