Example #1
0
    public void OnDrop(PointerEventData eventData)//OnEndDragより先に起きる
    {
        Debug.Log("OnDrop");

        CardMovement card = eventData.pointerDrag.GetComponent <CardMovement>();

        if (card != null)
        {
            //既存の建物を破壊
            //DemolishBuilding();

            card.parentAfterDrag   = this.transform;
            card.positionAfterDrag = this.transform.position;
            this.building          = card.GetComponent <CardBuildingController>();
            hand.Build(building);
            GameManager.Instance.isBuilding = false;
            Debug.Log("GetBuilding: " + this.building);
            //Debug.Log("Handcount: " + hand.model.cards.Count);
        }
    }