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


C# Card.CheckAbilities方法代码示例

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


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

示例1: 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

示例2: ReturnToHand

    public void ReturnToHand(Card c)
    {
        bool bIsVanguard = c.IsVanguard();
        fieldPositions cardPos = c.pos;
        Game.SendPacket(GameAction.RETURN_FROM_FIELD_TO_HAND, c.pos);
        Game.field.RemoveFrom(c.pos);
        Game.playerHand.AddToHand(c);
        if(!bIsVanguard)
        {
            c.CheckAbilities(CardState.HandFromRear);

            //Game.GameChat.AddChatMessage("ADMIN", c.name + " returns to hand." + " " + cardPos);

            Game.field.CheckAbilitiesExcept(cardPos, CardState.HandFromRear_NotMe, c);
        }
    }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:16,代码来源:UnitObject.cs

示例3: StandUnit

 public void StandUnit(Card card)
 {
     card.bBecomeStandThisTurn = true;
     card.Stand();
     Game.SendPacket(GameAction.STAND_UNIT, card.pos);
     card.CheckAbilities(CardState.Stand, card);
     Game.field.CheckAbilitiesExcept(card.pos, CardState.Stand_NotMe, card);
 }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:8,代码来源:UnitObject.cs

示例4: RestUnit

    public void RestUnit(Card card)
    {
        Game.LastRest = card;

        card.Rest();
        Game.SendPacket(GameAction.REST_UNIT, card.pos);

        card.CheckAbilities(CardState.Rest);
        Game.field.CheckAbilitiesExcept(card.pos, CardState.Rest_NotMe);
    }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:10,代码来源:UnitObject.cs

示例5: RetireUnit

    public void RetireUnit(Card card)
    {
        if(!card.bCanBeRetireByEffects)
        {
            SelectAnimField(card);
            return;
        }

        Game.field.ClearZone(card.pos);
        Game.field.AddToDropZone(card);
        Game.SendPacket(GameAction.SEND_TO_DROPZONE, card.pos);

        if(!card.IsVanguard())
        {
            Game.field.CheckAbilitiesExcept(card.pos, CardState.UnitSendToDropZoneFromRC, card);
            card.CheckAbilities(CardState.DropZoneFromRC);
        }
    }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:18,代码来源:UnitObject.cs

示例6: ReturnToHand

 public void ReturnToHand(Card c)
 {
     bool bIsVanguard = c.IsVanguard();
     Game.SendPacket(GameAction.RETURN_FROM_FIELD_TO_HAND, c.pos);
     Game.field.RemoveFrom(c.pos);
     Game.playerHand.AddToHand(c);
     if(!bIsVanguard)
     {
         c.CheckAbilities(CardState.HandFromRear);
         Game.field.CheckAbilitiesExcept(c.pos, CardState.HandFromRear_NotMe, c);
     }
 }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:12,代码来源:UnitAbility.cs

示例7: Remove

    public void Remove(Card c, bool myGuardian = false)
    {
        cards.Remove(c);
        game.CardToAttack.extraShield -= c.shield;

        if(myGuardian)
        {
            field.AddToDropZone(c);
            c.CheckAbilities(CardState.DropZoneFromGC);
            field.CheckAbilities(CardState.DropZoneFromGC_NotMe, c);
            if(c.bSentinel)
            {
                bPerfectGuard = false;
                game.CardToAttack.bCanBeHit = true;
            }
        }
        else
        {
            enemyField.AddToDropZone(c, false);
        }
    }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:21,代码来源:GuardZone.cs

示例8: RetireUnit

    public void RetireUnit(Card card)
    {
        if(!card.IsVanguard())
        {
            card.CheckAbilities(CardState.DropZoneFromRC);
        }

        field.ClearZone(card.pos);
        field.AddToDropZone(card);
        SendPacket(GameAction.SEND_TO_DROPZONE, card.pos);
    }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:11,代码来源:Gameplay.cs

示例9: CallFromDrop

    public void CallFromDrop(Card card, fieldPositions p)
    {
        field.RemoveFromDropzone(card);
        field.Call(card, p);

        LastCallFromDrop = card;

        card.CheckAbilities(CardState.CallFromDrop);
        field.CheckAbilitiesExcept(card.pos, CardState.CallFromDrop_NotMe);

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

示例10: BoostUnit

    void BoostUnit(Card c)
    {
        //C: Attacer
        //B: Booster

        Card b = field.GetCardAt(BackRow(c.pos));
        c.IncreasePower(b.GetPower());
        SendPacket(GameAction.POWER_INCREASE, c.pos, b.GetPower());
        b.boostedUnit = c;
        b.Rest();
        SendPacket(GameAction.REST_UNIT, b.pos);
        b.CheckAbilities(CardState.Boost);
        c.IsBoostedBy = b;

        SendPacket (GameAction.BOOST, c.pos);
        c.CheckAbilities(CardState.IsBoosted);

        //bEffectOnGoing = false;
        //bConfirmBoost = true;
        BoostUnit();
    }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:21,代码来源:Gameplay.cs

示例11: Call

    public void Call(Card card, fieldPositions pos)
    {
        _Game.SendGameChatMessage(card.name + ", Call!", ChatTab.GAME);
        _Game.UnitsCalled.Add(card);
        _Game.LastCall = card;

        //Reseting current status.
        ResetCard(card);

        card._Coord = CardCoord.FIELD;
        card.pos = pos;

        if(pos == fieldPositions.FRONT_GUARD_LEFT)
        {
            if(Left_Front != null)
            {
                AddToDropZone(RemoveFrom(pos));
            }

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

            Right_Front = card;
            Right_Front.GetGameObject().transform.position    = fieldInfo.GetPosition((int)fieldPositions.FRONT_GUARD_RIGHT);
            Right_Front.GetGameObject().transform.eulerAngles = fieldInfo.GetCardRotation();
            FrontRightPower.text = card.GetPower() + "";
        }
        else if(pos == fieldPositions.REAR_GUARD_CENTER)
        {
            if(Center_Rear != null)
                AddToDropZone(RemoveFrom(pos));

            Center_Rear = card;
            Center_Rear.GetGameObject().transform.position    = fieldInfo.GetPosition((int)fieldPositions.REAR_GUARD_CENTER);
            Center_Rear.GetGameObject().transform.eulerAngles = fieldInfo.GetCardRotation();
            RearCenterPower.text = card.GetPower() + "";
        }
        else if(pos == fieldPositions.REAR_GUARD_LEFT)
        {
            if(Left_Rear != null)
                AddToDropZone(RemoveFrom(pos));

            Left_Rear = card;
            Left_Rear.GetGameObject().transform.position    = fieldInfo.GetPosition((int)fieldPositions.REAR_GUARD_LEFT);
            Left_Rear.GetGameObject().transform.eulerAngles = fieldInfo.GetCardRotation();
            RearLeftPower.text = card.GetPower() + "";
        }
        else if(pos == fieldPositions.REAR_GUARD_RIGHT)
        {
            if(Right_Rear != null)
                AddToDropZone(RemoveFrom(pos));

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

        card.CheckAbilities(CardState.Call);
        LastUnitCalled = card;
        CheckAbilities(CardState.Call_NotMe, card);

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

示例12: Ride

    public void Ride(Card card, bool bActiveEvents = true)
    {
        _Game.SendGameChatMessage(card.name + ", Ride!", ChatTab.GAME);

        //Reseting current status.
        ResetCard(card);

        if(Soul.Count > 0)
        {
            Soul[Soul.Count - 1].SetIsVanguard(false);
            Soul[Soul.Count - 1]._Coord = CardCoord.SOUL;
            lastVanguard = Soul[Soul.Count - 1];
        }

        Soul.Add (card);
        card._Coord = CardCoord.FIELD;
        card.SetIsVanguard(true);
        Vanguard = card;

        //Vanguard.GetGameObject().transform.position = fieldInfo.GetPosition((int)fieldPositions.VANGUARD_CIRCLE) + delta * (Soul.Count - 1);
        //Vanguard.GetGameObject().transform.eulerAngles = fieldInfo.GetCardRotation();

        Vanguard.MoveAndRotate(fieldInfo.GetPosition((int)fieldPositions.VANGUARD_CIRCLE) + delta * (Soul.Count - 1), fieldInfo.GetCardRotation());

        VanguardPower.text = card.GetPower() + "";
        card.pos = fieldPositions.VANGUARD_CIRCLE;

        CallAnimation(card);
        FixSoulPosition();

        if(Soul.Count > 1 && bActiveEvents)
        {
            Soul[Soul.Count - 2].CheckAbilities(CardState.RideAboveIt);
            Soul[Soul.Count - 2].CheckAbilities(CardState.LeaveField);
        }

        CheckAbilitiesDrop(CardState.DropZone_Ride);
        CheckAbilitiesSoul(CardState.Soul_Ride);

        if(bActiveEvents)
        {
            CheckAbilitiesExcept(card.pos, CardState.Ride_NotMe, card);
            card.CheckAbilities(CardState.Ride);
        }
    }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:45,代码来源:Field.cs


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