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


C# Card.GetPower方法代码示例

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


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

示例1: RealPower

    int RealPower(Card c)
    {
        return c.GetPower();
        /*
        int boostedPower = 0;
        if(c.IsBoostedBy != null)
        {
            boostedPower += c.IsBoostedBy.GetPower();
        }

        return c.GetPower() - boostedPower - ModifyRealPower;
        */
    }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:13,代码来源:UnitAbility.cs

示例2: IncreaseEnemyPowerByTurn

 public void IncreaseEnemyPowerByTurn(Card c, int power)
 {
     if(power < 0)
     {
         if(-power > c.GetPower())
         {
             power = -c.GetPower();
         }
     }
     Game.SendPacket(GameAction.INCREASE_ENEMY_POWER_TURN, c.pos, power);
 }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:11,代码来源:UnitObject.cs

示例3: IncreaseEnemyPowerByBattle

 void IncreaseEnemyPowerByBattle(Card c, int power)
 {
     if(power < 0)
     {
         if(-power > c.GetPower())
         {
             power = -c.GetPower();
         }
     }
     Game.SendPacket(GameAction.INCREASE_ENEMY_POWER_BATTLE, c.pos, power);
 }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:11,代码来源:UnitAbility.cs

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

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

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

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