Пример #1
0
    override public void OnMouseUpAsButton()
    {
        //TODO: extra logic for non-minions based cards and field movement

        //unoccupied
        if (null == currentCard)
        {
            DragDropManager.Callback(this);
            if (this.Target != null)
            {
                //access the game object that would be dropped
                currentCard = this.Target.gameObject;
                currentCard.transform.SetParent(this.transform);

                //load and summons the minion
                DuelCard duelCard = currentCard.GetComponent <DuelCard>();
                if (null != duelCard)
                {
                    //TODO: Event for OnSummon
                    //summon the monster
                    duelCard.Summon();
                    duelCard.gameObject.transform.position = this.transform.position;

                    //TODO: Event for AfterSummon
                }
                DragDropManager.CompleteCallback();
            }
        }
    }