当前位置: 首页>>代码示例>>C#>>正文


C# Card.TurnUp方法代码示例

本文整理汇总了C#中Card.TurnUp方法的典型用法代码示例。如果您正苦于以下问题:C# Card.TurnUp方法的具体用法?C# Card.TurnUp怎么用?C# Card.TurnUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Card的用法示例。


在下文中一共展示了Card.TurnUp方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddToGuardZone

    public void AddToGuardZone(Card _card, bool bPlayerView)
    {
        cards.Add(_card);
        _card.TurnUp();

        Vector3 newPosition = positions[(cards.Count - 1) % 4];
        Vector3 newAngle;

        if(bPlayerView) newAngle = playerRotation;
        else newAngle = enemyRotation;

        _card.MoveAndRotate(newPosition, newAngle);

        _card._Coord = CardCoord.GUARD;
    }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:15,代码来源:GuardZone.cs

示例2: AddToHand

    public void AddToHand(Card card)
    {
        hand.Add(card);

        for(int i = 0; i < hand.Count - 1; i++)
        {
            hand[i].MoveAndRotate(GetPositionOf(i));
        }

        card._Coord = CardCoord.HAND;

        //FixPositions();
        //card.GetGameObject().transform.eulerAngles = new Vector3(24.0f, 180.0f, 0.0f);
        card.MoveAndRotate(GetPositionOf(hand.Count - 1));
        bFixHandPosition = true;
        card.TurnUp();

        //card.TurnUp();
        card.bIsInhand = true;
    }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:20,代码来源:PlayerHand.cs

示例3: CallFromDeck

 public void CallFromDeck(Card c, fieldPositions p)
 {
     Game.playerDeck.RemoveFromDeck(c);
     Game.field.Call(c, p);
     c.CheckAbilities(CardState.CallFromDeck, c);
     Game.field.CheckAbilitiesExcept(c.pos, CardState.CallFromDeck_NotMe, c);
     Game.SendPacket(GameAction.PLAY_CARD_FROM_DECK, c.cardID, (int)Util.TranformToEnemyPosition(c.pos));
     c.TurnUp();
 }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:9,代码来源:UnitObject.cs

示例4: BindFromDeckUpdate

    /**
     * This method performs the animation of the cards that will be send to Bind Zone. And also performs
     * the remove from deck, add to bind and networking communication. This method must be call in a
     * Update function after a BindFromDeck method was called. When all Cards passed in the BindFromDeck
     * argument were sent to BindZone, func delegate will be executed.
     */
    public void BindFromDeckUpdate(Void0ParamsDelegate func)
    {
        if(BindFromDeck_Active)
        {
            if(BindFromDeck_Card == null || !BindFromDeck_Card.AnimationOngoing())
            {
                if(BindFromDeck_Card != null)
                {
                    //Remove from deck and add to BindZone.
                    Game.playerDeck.RemoveFromDeck(BindFromDeck_Card);
                    Game.field.AddToBindZone(BindFromDeck_Card);
                    BindFromDeck_Card = null;
                }

                //Send the next card in the list, if any. If not, func delegate is called.
                if(BindFromDeck_CardList.Count > 0)
                {
                    BindFromDeck_Card = BindFromDeck_CardList[0];
                    BindFromDeck_CardList.RemoveAt(0);
                    BindFromDeck_Card.TurnUp();
                    BindFromDeck_Card.BindAnim();
                    Game.SendPacket (GameAction.BIND_FROM_DECK, BindFromDeck_Card.cardID);
                }
                else
                {
                    BindFromDeck_Active = false;
                    func();
                }
            }
        }
    }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:37,代码来源:UnitObject.cs

示例5: FromDeckToDamage

 public void FromDeckToDamage(Card c, bool bFaceup = false)
 {
     Game.playerDeck.RemoveFromDeck(c);
     Game.field.AddToDamageZone(c);
     if(bFaceup)
     {
         c.TurnUp();
         Game.SendPacket(GameAction.FROM_DECK_TO_DAMAGE_FACEUP, c.cardID);
     }
     else
     {
         c.TurnDown();
         Game.SendPacket(GameAction.FROM_DECK_TO_DAMAGE, c.cardID);
     }
 }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:15,代码来源:UnitObject.cs

示例6: FromDamageToDeck

 void FromDamageToDeck(Card c)
 {
     int idx = Game.field.GetDamageIndexOf(c);
     Game.field.RemoveFromDamage(c);
     Game.playerDeck.AddCard(c);
     c.TurnUp();
     Game.SendPacket(GameAction.FROM_DAMAGE_TO_DECK, idx);
 }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:8,代码来源:UnitAbility.cs

示例7: CallFromDeck_SameColum

    public void CallFromDeck_SameColum(Card card, fieldPositions p)
    {
        _MouseHelper.AttachCard(card);
        card.TurnUp();
        bCallFromDeck = true;
        bCardMenuJustClosed = false;

        bCallToSameColum = true;
        bCallSameColPos = p;
    }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:10,代码来源:Gameplay.cs

示例8: AddToDropZone

    public void AddToDropZone(Card card)
    {
        LastCardSentToDrop = card;
        card._Coord = CardCoord.DROP;
        card.NormalizeMaterial();
        DropZone.Add(card);
        card.TurnUp();
        card.Stand();

        card.MoveAndRotate(fieldInfo.GetPosition((int)fieldPositions.DROP_ZONE) + new Vector3(0.0f, 0.01f * (DropZone.Count - 1), 0.0f),
                           new Vector3(0.0f, 180.0f, 0.0f));

        //card.GetGameObject().transform.position = fieldInfo.GetPosition((int)fieldPositions.DROP_ZONE) + new Vector3(0.0f, 0.01f * (DropZone.Count - 1), 0.0f);
        //card.GetGameObject().transform.eulerAngles = new Vector3(0.0f, 180.0f, 0.0f);
    }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:15,代码来源:Field.cs

示例9: Ride

    public void Ride(Card card)
    {
        if(Soul.Count > 0)
            Soul[Soul.Count - 1].SetIsVanguard(false);
        Soul.Add (card);

        card.pos = fieldPositions.ENEMY_VANGUARD;
        card._Coord = CardCoord.ENEMY_FIELD;

        card.SetIsVanguard(true);
        Vanguard = card;

        for(int i = 0; i < Soul.Count - 1; i++)
        {
            Soul[i].GetGameObject().transform.position = fieldInfo.GetPosition((int)EnemyFieldPosition.VANGUARD) + delta * i;
        }

        Vector3 newPosition = fieldInfo.GetPosition((int)EnemyFieldPosition.VANGUARD) + delta * (Soul.Count - 1);

        Vanguard.TurnUp();
        Vanguard.MoveAndRotate(newPosition, fieldInfo.GetCardRotation());

        //Vanguard.GetGameObject().transform.eulerAngles = fieldInfo.GetCardRotation();
        VanguardPower.text = card.GetPower() + "";

        CallAnimation(card, newPosition);
    }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:27,代码来源:EnemyField.cs

示例10: SendInformationToOpponent

    void SendInformationToOpponent(int cardID, int gameAction, int other1, int other2, string str1, int other3 = 0)
    {
        CardIdentifier _cardID = (CardIdentifier)cardID;
        GameAction _gameAction = (GameAction)gameAction;

        DataTransferManager.getTransferManager().ExecuteDataTransfer(new DataTransfer(_cardID, _gameAction, other1, other2, other3, str1));

        if(_gameAction == GameAction.LOSE_BY_CARD_EFFECT)
        {
            bGameEnded = true;
            bPauseGameplay = false;
            bWinByCardEffect = false;
            bLoseByCardEffect = true;
        }
        else if(_gameAction == GameAction.FORCE_DAMAGE_CHECK)
        {
            ForceDamageCheck(other1);
        }
        else if(_gameAction == GameAction.FROM_DECK_TO_GUARDIANCIRCLE)
        {
            Card tempCard = enemyDeck.DrawCard();
            Data.FillCardWithData(tempCard, _cardID);
            guardZone.AddToGuardZone(tempCard, false);
            //guardZone.AddExtraPower(tempCard.shield);
            CardToAttack.AddExtraShield(tempCard.shield);
            tempCard.TurnUp();
        }
        else if(_gameAction == GameAction.FROM_BIND_TO_DROP)
        {
            Card tmp = enemyField.GetCardFromBindByID(_cardID);
            enemyField.RemoveFromBindZone(tmp);
            enemyField.AddToDropZone(tmp, false);
        }
        else if(_gameAction == GameAction.OPPONENT_FROM_BIND_TO_DROP)
        {
            Card tmp = field.GetBoundByID(_cardID);
            dummyUnitObject.FromBindToDrop(tmp);
        }
        else if(_gameAction == GameAction.OPPONENT_FROM_HAND_TO_BIND)
        {
            int index = playerHand.Size() - other1;
            dummyUnitObject.FromHandToBind(playerHand.GetCardAtIndex(index), index, true);
        }
        else if(_gameAction == GameAction.ENEMY_FROM_BIND_TO_HAND)
        {
            Card cardToReturn = field.GetBoundByID(_cardID);
            dummyUnitObject.FromBindToHand(cardToReturn);
        }
        else if(_gameAction == GameAction.SET_ENEMY_ENDTURN)
        {
            enemyPhase = EnemyPhase.ENDTURN;
            SendPacket(GameAction.CONFORM_ENEMY_ENDTURN);
        }
        else if(_gameAction == GameAction.CONFORM_ENEMY_ENDTURN)
        {
            bConfirmEndTurn = true;
        }
        else if(_gameAction == GameAction.MOVE_TO_OPENRC)
        {
            Card c = enemyField.GetCardAt(Util.TranformToEnemyPosition((fieldPositions)other1));

            EnemyFieldPosition p2 = Util.TranformToEnemyPosition((fieldPositions)other2);
            fieldPositions p = Util.EnemyToFieldPosition(p2);

            enemyField.ClearZone(Util.TransformToEquivalentEnemyPosition(c.pos));

            c.pos = p;

            if(p == fieldPositions.ENEMY_FRONT_LEFT) enemyField.Left_Front = c;
            else if(p == fieldPositions.ENEMY_FRONT_RIGHT) enemyField.Right_Front = c;
            else if(p == fieldPositions.ENEMY_REAR_CENTER) enemyField.Center_Rear = c;
            else if(p == fieldPositions.ENEMY_REAR_RIGHT) enemyField.Right_Rear = c;
            else if(p == fieldPositions.ENEMY_REAR_LEFT)  enemyField.Left_Rear = c;

            Vector3 newVector = enemyField.fieldInfo.GetPosition((int)p2);
            c.GoTo(newVector.x, newVector.z);
        }
        else if(_gameAction == GameAction.EXCHANGE)
        {
            Card c1 = enemyField.GetCardAt(Util.TranformToEnemyPosition((fieldPositions)other1));
            Card c2 = enemyField.GetCardAt(Util.TranformToEnemyPosition((fieldPositions)other2));

            fieldPositions p1 = c1.pos;
            fieldPositions p2 = c2.pos;

            if(p1 == fieldPositions.ENEMY_REAR_CENTER)      enemyField.Center_Rear = c2;
            else if(p1 == fieldPositions.ENEMY_REAR_LEFT)   enemyField.Left_Rear   = c2;
            else if(p1 == fieldPositions.ENEMY_REAR_RIGHT)  enemyField.Right_Rear  = c2;
            else if(p1 == fieldPositions.ENEMY_FRONT_LEFT)  enemyField.Left_Front  = c2;
            else if(p1 == fieldPositions.ENEMY_FRONT_RIGHT) enemyField.Right_Front = c2;

            if(p2 == fieldPositions.ENEMY_REAR_CENTER)      enemyField.Center_Rear = c1;
            else if(p2 == fieldPositions.ENEMY_REAR_LEFT)   enemyField.Left_Rear   = c1;
            else if(p2 == fieldPositions.ENEMY_REAR_RIGHT)  enemyField.Right_Rear  = c1;
            else if(p2 == fieldPositions.ENEMY_FRONT_LEFT)  enemyField.Left_Front  = c1;
            else if(p2 == fieldPositions.ENEMY_FRONT_RIGHT) enemyField.Right_Front = c1;

            c1.pos = p2;
            c2.pos = p1;

//.........这里部分代码省略.........
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:101,代码来源:Gameplay.cs

示例11: Call

    public void Call(Card card, EnemyFieldPosition pos)
    {
        card.pos = (fieldPositions)((int)pos + 9);

        card._Coord = CardCoord.ENEMY_FIELD;

        card.TurnUp();

        Vector3 newPosition, newAngle;

        if(pos == EnemyFieldPosition.FRONT_LEFT)
        {
            if(Left_Front != null)
            {
                AddToDropZone(RemoveFrom(pos), false);
            }

            Left_Front = card;
            //Left_Front.GetGameObject().transform.position    = fieldInfo.GetPosition((int)pos);
            //Left_Front.GetGameObject().transform.eulerAngles = fieldInfo.GetCardRotation();
            FrontLeftPower.text = card.GetPower() + "";
        }
        else if(pos == EnemyFieldPosition.FRONT_RIGHT)
        {
            if(Right_Front != null)
            {
                Debug.Log("Adding to DropZone");
                AddToDropZone(RemoveFrom(pos), false);
            }

            Right_Front = card;
            //Right_Front.GetGameObject().transform.position    = fieldInfo.GetPosition((int)pos);
            //Right_Front.GetGameObject().transform.eulerAngles = fieldInfo.GetCardRotation();
            FrontRightPower.text = card.GetPower() + "";
        }
        else if(pos == EnemyFieldPosition.REAR_CENTER)
        {
            if(Center_Rear != null)
                AddToDropZone(RemoveFrom(pos), false);

            Center_Rear = card;
            //Center_Rear.GetGameObject().transform.position    = fieldInfo.GetPosition((int)pos);
            //Center_Rear.GetGameObject().transform.eulerAngles = fieldInfo.GetCardRotation();
            RearCenterPower.text = card.GetPower() + "";
        }
        else if(pos == EnemyFieldPosition.REAR_LEFT)
        {
            if(Left_Rear != null)
                AddToDropZone(RemoveFrom(pos), false);

            Left_Rear = card;
            //Left_Rear.GetGameObject().transform.position    = fieldInfo.GetPosition((int)pos);
            //Left_Rear.GetGameObject().transform.eulerAngles = fieldInfo.GetCardRotation();
            RearLeftPower.text = card.GetPower() + "";
        }
        else if(pos == EnemyFieldPosition.REAR_RIGHT)
        {
            if(Right_Rear != null)
                AddToDropZone(RemoveFrom(pos), false);

            Right_Rear = card;
            //Right_Rear.GetGameObject().transform.position    = fieldInfo.GetPosition((int)pos);
            //Right_Rear.GetGameObject().transform.eulerAngles = fieldInfo.GetCardRotation();
            RearRightPower.text = card.GetPower() + "";
        }

        newPosition = fieldInfo.GetPosition((int)pos);
        newAngle    = fieldInfo.GetCardRotation();

        card.MoveAndRotate(newPosition, newAngle);
        CallAnimation(card, newPosition);
    }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:72,代码来源:EnemyField.cs

示例12: AddToDropZone

    public void AddToDropZone(Card card, bool bFromField)
    {
        DropZone.Add(card);
        card.TurnUp();
        card.StandEnemy();
        //card.GetGameObject().transform.position = fieldInfo.GetPosition((int)fieldPositions.DROP_ZONE) + new Vector3(0.0f, 0.01f * (DropZone.Count - 1), 0.0f);
        //card.GetGameObject().transform.eulerAngles = new Vector3(0.0f, 0.0f, 0.0f);

        card.MoveAndRotate(fieldInfo.GetPosition((int)fieldPositions.DROP_ZONE) + new Vector3(0.0f, 0.01f * (DropZone.Count - 1), 0.0f),
                           new Vector3(0.0f, 0.0f, 0.0f));

        if(bFromField)
        {
            //Game.playerHand.CheckHandEffects(CardState.EnemyCardSendToDropZone);
            //Game.field.CheckAbilities(CardState.EnemyCardSendToDropZone);
        }
    }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:17,代码来源:EnemyField.cs

示例13: AddToDamageZone

    public void AddToDamageZone(Card card)
    {
        card._Coord = CardCoord.ENEMY_DAMAGE;
        DamageZone.Add(card);
        card.TurnUp();

        Vector3 newPosition = new Vector3(15.70469f, 0.7570782f, 5.772846f) + new Vector3(0.0f, 0.01f * (DamageZone.Count - 1), 2.0f * (DamageZone.Count - 1));
        Vector3 newAngle    = new Vector3(0.0f, -90.0f, 0.0f);

        card.MoveAndRotate(newPosition, newAngle);

        //card.GetGameObject().transform.position = new Vector3(15.70469f, 0.7570782f, 5.772846f) + new Vector3(0.0f, 0.01f * (DamageZone.Count - 1), 2.0f * (DamageZone.Count - 1));
        //card.GetGameObject().transform.eulerAngles = new Vector3(0.0f, -90.0f, 0.0f);
    }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:14,代码来源:EnemyField.cs

示例14: CallFromDeckUpdate

 public void CallFromDeckUpdate(Void0ParamsDelegate func)
 {
     if(_CFDAux_Bool1)
     {
         if(Game._MouseHelper.GetAttachedCard() == null)
         {
             if(_CFDAux_Int1 <= 0)
             {
                 _CFDAux_Bool1 = false;
                 func();
             }
             else
             {
                 _CFDAux_Card = Game.playerDeck.SearchForID(_CFDAux_IDVector[0]);
                 CallFromDeckList.Add(Game.playerDeck.SearchForID(_CFDAux_IDVector[0]));
                 _CFDAux_IDVector.RemoveAt(0);
                 Game.playerDeck.RemoveFromDeck(_CFDAux_Card);
                 Game.CallFromDeck(_CFDAux_Card);
                 _CFDAux_Card.TurnUp();
                 _CFDAux_Int1--;
             }
         }
         else
         {
             Game.HandleCallFromDeck();
         }
     }
 }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:28,代码来源:UnitObject.cs

示例15: RideFromDeck

    public void RideFromDeck(Card card)
    {
        card.TurnUp();
        playerDeck.RemoveFromDeck(card);

        SendPacket(GameAction.RIDE_FROM_DECK, card.cardID);
        field.Ride(card);
    }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:8,代码来源:Gameplay.cs


注:本文中的Card.TurnUp方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。