public void OnPointerClick(PointerEventData eventData) { if (!tactic.activeSelf) { collectionManager.SetCurrentPage("Tactic", 1); } else { lineupBuilder.RemoveTactic(tactic.GetComponent <TacticInfo>().tacticAttributes); } }
public void OnBeginDrag(PointerEventData eventData) { selectedObject = eventData.pointerCurrentRaycast.gameObject; if (selectedObject.name != TACTICSLOTPANEL) { return; } tactic = selectedObject.transform.parent.Find("Tactic").gameObject; if (!tactic.activeSelf) { return; } dragBegins = true; infoCard.SetActive(true); infoCard.transform.position = Input.mousePosition; infoCard.GetComponent <CardInfo>().SetAttributes(tactic.GetComponent <TacticInfo>().tacticAttributes); lineupBuilder.RemoveTactic(tactic.GetComponent <TacticInfo>().tacticAttributes); }