public void CerrarPanelHerramientas() { if (panelHerramientas.isActive()) { panelHerramientas.ToogleActive(); Debug.Log("CERRAR PANEL"); } }
public void OnDrag(PointerEventData eventData) { if (mover) { Debug.Log("MOVIENDO FICHA"); if (GetComponentInParent <PanelCrearJugadas>().GetHerramientaActual().GetNombre() == "Seleccionar") { Debug.Log("HERRAMIENTA SELECCION"); if (panelHerramientas.isActive()) { Debug.Log("PANEL ABIERTO -> LO CIERRO"); panelHerramientas.ToogleActive(); moviendo = true; } Vector3 mPos = Input.mousePosition; mPos.z = 2f; Vector3 goPos = Camera.main.ScreenToWorldPoint(mPos); transform.position = goPos; if (!escalado) { transform.localScale *= 1.3f; escalado = true; } GetComponentInParent <PanelCrearJugadas>().SetObjetoActual(this.gameObject); } } }