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


C# Card.GetGameObject方法代码示例

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


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

示例1: AttachCard

 public void AttachCard(Card card)
 {
     _CardAttached = card;
     _CardAttached.GetGameObject().transform.position = _FieldInfo.GetPosition((int)GetEmptyRearPosition());
     _CardAttached.GetGameObject().transform.eulerAngles = _FieldInfo.GetCardRotation();
     _Game._CardMenuHelper.SetCard(card.cardID);
 }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:7,代码来源:MouseHelper.cs

示例2: Open

    public void Open(Card card)
    {
        bIgnore = true;
        _Card = card;
        bOpen = true;
        iSelectedCard = 0;
        _Game.playerHand.bBlockHand = false;

        num_options = 0;
        if(_Card.bIsInhand)
        {
            Card tmpVanguard = _Game.field.GetCardAt(fieldPositions.VANGUARD_CIRCLE);
            if(tmpVanguard.grade >= _Card.grade)
            {
                SetOption("Call");
            }

            if(tmpVanguard.grade == _Card.grade || tmpVanguard.grade == (_Card.grade - 1))
            {
                if(_Game.bRideThisTurn && _Card.unitAbilities.CanRide())
                {
                    SetOption("Ride");
                }
            }

            if(_Card.unitAbilities.HasInHandEffect(_Card))
            {
                SetOption ("Activate");
            }
        }
        else if(_Card._Coord == CardCoord.DAMAGE)
        {
            if(_Card.unitAbilities.HasOnDamageEffect() > 0)
            {
                SetOption("Activate");
            }
        }
        else
        {
            //Card is on the field.
            int count = _Card.unitAbilities.HasOnFieldEffect(_Card);
            if(count == 1)
            {
                SetOption("Activate");
            }
            else if(count > 1)
            {
                for(int i = 1; i <= count; i++)
                {
                    SetOption("Activate " + i);
                }
            }

            if(card.IsVanguard() && _Game.field.GetNumberOfCardsInSoul() > 0)
            {
                SetOption("View soul");
            }

            if(card.pos == fieldPositions.REAR_GUARD_LEFT ||
               card.pos == fieldPositions.REAR_GUARD_RIGHT||
               card.pos == fieldPositions.FRONT_GUARD_LEFT||
               card.pos == fieldPositions.FRONT_GUARD_RIGHT)
            {
                Card c = card.unitAbilities.GetSameColum(card.pos);
                if(c == null || !c.IsLocked())
                {
                    SetOption("Move");
                }
            }
        }

        SetOption("Cancel");

        Vector3 pos = _Camera.WorldToScreenPoint(card.GetGameObject().transform.position);
        _x = pos.x + 10.0f;
        _y = Camera.main.pixelHeight - pos.y - 50.0f;
        //_Game.bBlockMouse = true;

        if(num_options == 1)
        {
            Close ();
            _Game.bCardMenuJustClosed = false;
        }
    }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:84,代码来源:CardMenu.cs

示例3: OpenOnDrop

    public void OpenOnDrop(Card card)
    {
        bOpen = true;
        bIgnore = true;
        num_options = 0;
        iSelectedCard = 0;
        _Card = card;
        SetOption("View Dropzone");
        SetOption("Cancel");

        _customW = 30;

        Vector3 pos = _Camera.WorldToScreenPoint(card.GetGameObject().transform.position);
        _x = pos.x + 10.0f;
        _y = Camera.main.pixelHeight - pos.y - 50.0f;
        //_Game.bBlockMouse = true;
    }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:17,代码来源:CardMenu.cs

示例4: OpenDeckMenu

    public void OpenDeckMenu(Card card)
    {
        _Card = card;
        bOpen = true;
        iSelectedCard = 0;
        _Game.playerHand.bBlockHand = false;

        num_options = 0;
        _customW = 20;

        _Game.playerDeck.RemoveFromDeck(card);
        SetOption("Put on top");
        SetOption("Put on bottom");

        Vector3 pos = _Camera.WorldToScreenPoint(card.GetGameObject().transform.position);
        _x = pos.x + 10.0f;
        _y = Camera.main.pixelHeight - pos.y - 50.0f;
        _Game.bBlockMouse = true;

        _Game._CardMenuHelper.SetCard(card.cardID);
    }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:21,代码来源:CardMenu.cs

示例5: SendInformationToOpponent


//.........这里部分代码省略.........
        }
        else if(_gameAction == GameAction.STAND_ALL_UNITS)
        {
            //enemyField.StandAllUnits();
            enemyField.DoStandPhase();
        }
        else if(_gameAction == GameAction.SEND_TO_DROPZONE)
        {
            enemyField.AddToDropZone(enemyField.GetCardAt((EnemyFieldPosition)other1), true);
            enemyField.ClearZone((EnemyFieldPosition)other1);
        }
        else if(_gameAction == GameAction.SELECT_ANIM_DAMAGE)
        {
            enemyField.GetDamageAtIndex(other1).DoSelectAnim();
        }
        else if(_gameAction == GameAction.DRIVE_CHECK)
        {
            if(field.GetCardAt(fieldPositions.VANGUARD_CIRCLE).hasTwinDrive())
            {
                bTwinDrive = true;
            }
            else
            {
                bTwinDrive = false;
            }
            DriveCheck();
        }
        else if(_gameAction == GameAction.PUT_CARD_ON_DRIVEZONE)
        {
            DriveCard = enemyDeck.DrawCard();
            if(DriveCard != null)
            {
                Data.FillCardWithData(DriveCard, _cardID);
                DriveCard.GetGameObject().transform.position = EnemyFieldInfo.GetPosition((int)EnemyFieldPosition.DRIVE);
                DriveCard.GetGameObject().transform.eulerAngles = EnemyFieldInfo.GetDriveRotation();
                DriveCard.TurnUp();
            }
        }
        else if(_gameAction == GameAction.SEND_DRIVE_TO_HAND)
        {
            if(DriveCard != null)
            {
                enemyHand.AddToHand(DriveCard);
                DriveCard = null;
            }
        }
        else if(_gameAction == GameAction.END_DRIVECHECK)
        {
            for(int i = 0; i < AttackedList.Count - 1; i++)
            {
                ResolveBattle(AttackedList[i]);
            }

            ResolveLastBattle(AttackedList[AttackedList.Count - 1]);
        }
        else if(_gameAction == GameAction.STAND_UNIT)
        {
            enemyField.GetCardAt((EnemyFieldPosition)other1).StandEnemy();
        }
        else if(_gameAction == GameAction.REST_ENEMY_UNIT)
        {
            fieldPositions p = Util.TransformToPlayerField((fieldPositions)other1);
            Card c = field.GetCardAt(p);
            if(c != null)
            {
                c.Rest();
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:67,代码来源:Gameplay.cs

示例6: CallAnimation

    public void CallAnimation(Card c)
    {
        if(c != null)
        {

            bCallEffectAnimation = true;
            CallEffectTimer = MaxTimeCallEffect;
            CallEffect_Scale = 8;
            CallEffect.renderer.material.color = new Color(CallEffect.renderer.material.color.r,
                                                           CallEffect.renderer.material.color.b,
                                                           CallEffect.renderer.material.color.g,
                                                  		   1);
            CallEffect.transform.localScale = new Vector3(CallEffect_Scale, 1, CallEffect_Scale);

            if(c.pos == fieldPositions.VANGUARD_CIRCLE || c.pos == fieldPositions.REAR_GUARD_CENTER)
            {
                //CallEffect.transform.position = c.GetGameObject().transform.position + new Vector3(0, -0.55f, 0);
                CallEffect.transform.position = fieldInfo.GetPosition((int)c.pos) + new Vector3(0, -0.55f, 0);
            }
            else
            {
                CallEffect.transform.position = c.GetGameObject().transform.position + new Vector3(0, -0.5f, 0);
            }
        }
    }
开发者ID:Javierudec,项目名称:VGOnline_Scripts,代码行数:25,代码来源:Field.cs

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


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