Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class TileClickeable : MonoBehaviour {
- // Creamos 2 variables para los valores de (x,y) del tile.
- public int tileX;
- public int tileY;
- // variable del contenedor de los tiles.
- public Map map;
- // Cada vez que hagamos click a un tile la consola nos dara un "click!".
- void OnMouseUp(){
- Debug.Log("Click!");
- // Función para mover la unidad seleccionada al tile clickeado.
- map.MoverUnidadSeleccionadaA(tileX,tileY);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement