public void Die() { _cardCanvasManager.RemoveFromCardsObjList(gameObject); _abilityCardCanvasButton.RemoveFromCardsList(this); _cardCanvasManager.PositionAndRotationCards(); Destroy(gameObject); }
public void SetToCell(Cell cell) { if (cell) { CurrentCell = cell; cell.Occupy(); RectTransform.SetParent(cell.transform); RectTransform.localPosition = Vector3.zero; GetComponent <CardCanvas>().SetOnTable(); _cardCanvasManager.RemoveFromCardsObjList(gameObject); _abilityCardCanvasButton.RemoveFromCardsList(gameObject.GetComponent <CardCanvas>()); } _cardCanvasManager.PositionAndRotationCards(); }