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


C# Card.MoveAndRotate方法代码示例

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


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

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

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

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

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

示例9: AddToDamageZone

    public void AddToDamageZone(Card card)
    {
        card._Coord = CardCoord.DAMAGE;
        DamageZone.Add(card);
        card.TurnUp();
        /*
        card.GetGameObject().transform.position = new Vector3(-16.16396f, 0.5685959f, -5.766267f);
        card.GetGameObject().transform.position += 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);
        */

        Vector3 newPosition = new Vector3(-16.16396f, 0.5685959f, -5.766267f) + 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);

        CheckAbilities(CardState.CardPutInDamage, card);
        CheckAbilitiesDamage(CardState.DamageZone_CardPutInDamage, card);
    }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:19,代码来源:Field.cs


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