コード例 #1
0
    public void Die()
    {
        _cardCanvasManager.RemoveFromCardsObjList(gameObject);
        _abilityCardCanvasButton.RemoveFromCardsList(this);

        _cardCanvasManager.PositionAndRotationCards();
        Destroy(gameObject);
    }
コード例 #2
0
    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();
    }