コード例 #1
0
ファイル: CardObj.cs プロジェクト: t1revolution/CardGamePrac3
    public void OnUserAction()
    {
        CardEffect cardeffect = GetComponentInParent <CardEffect>();

        activate = cardeffect.CardExistActivate();
        if (activate == false)
        {
            this.transform.localScale = new Vector3(1.0f, 1.5f, 0.0f);
            this.step = CARD.STEP.TOUCHE;
        }
    }
コード例 #2
0
ファイル: CardObj.cs プロジェクト: t1revolution/CardGamePrac3
    // コスト支払い時のみ接触判定で機能する関数
    public void CardCost()
    {
        Debug.Log("cost1:" + cost);

        //if (this.reference != CARD.EFFECT.CANCEL && cost > 0)
        if (this.reference != CARD.EFFECT.CANCEL)
        {
            //this.transform.localScale = new Vector3(0.6f, 0.6f, 0.0f);
            Card       card          = GetComponentInParent <Card>();
            CardEffect cardeffect    = GetComponentInParent <CardEffect>();
            bool       self_activate = card.activate;
            activate = cardeffect.CardExistActivate();
            if (activate == true && self_activate == false)
            {
                this.step     = CARD.STEP.COST;
                card_position = this.transform.position;
                Debug.Log("card_position.x:" + card_position.x);
                Debug.Log("card_position.y:" + card_position.y);
                card.selected = true;
            }
        }
        this.reference = CARD.EFFECT.NONE;
    }