本文整理汇总了C#中Card.GoTo方法的典型用法代码示例。如果您正苦于以下问题:C# Card.GoTo方法的具体用法?C# Card.GoTo怎么用?C# Card.GoTo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Card
的用法示例。
在下文中一共展示了Card.GoTo方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MoveToOpenRC
public void MoveToOpenRC(Card c, fieldPositions p)
{
Game.SendPacket(GameAction.MOVE_TO_OPENRC, (int)c.pos, (int)p, 0);
Game.field.ClearZone(c.pos);
c.pos = p;
if(p == fieldPositions.FRONT_GUARD_LEFT) Game.field.Left_Front = c;
else if(p == fieldPositions.FRONT_GUARD_RIGHT) Game.field.Right_Front = c;
else if(p == fieldPositions.REAR_GUARD_CENTER) Game.field.Center_Rear = c;
else if(p == fieldPositions.REAR_GUARD_RIGHT) Game.field.Right_Rear = c;
else if(p == fieldPositions.REAR_GUARD_LEFT) Game.field.Left_Rear = c;
Vector3 newVector = Game.field.fieldInfo.GetPosition((int)p);
c.GoTo(newVector.x, newVector.z);
}
示例2: ExchangePositions
public void ExchangePositions(Card c1, Card c2)
{
if(c1 == null || c2 == null) return;
if(c1._Coord != CardCoord.FIELD || c2._Coord != CardCoord.FIELD) return;
Game.SendPacket(GameAction.EXCHANGE, (int)c1.pos, (int)c2.pos, 0);
fieldPositions p1 = c1.pos;
fieldPositions p2 = c2.pos;
if(p1 == fieldPositions.REAR_GUARD_CENTER) Game.field.Center_Rear = c2;
else if(p1 == fieldPositions.REAR_GUARD_LEFT) Game.field.Left_Rear = c2;
else if(p1 == fieldPositions.REAR_GUARD_RIGHT) Game.field.Right_Rear = c2;
else if(p1 == fieldPositions.FRONT_GUARD_LEFT) Game.field.Left_Front = c2;
else if(p1 == fieldPositions.FRONT_GUARD_RIGHT) Game.field.Right_Front = c2;
if(p2 == fieldPositions.REAR_GUARD_CENTER) Game.field.Center_Rear = c1;
else if(p2 == fieldPositions.REAR_GUARD_LEFT) Game.field.Left_Rear = c1;
else if(p2 == fieldPositions.REAR_GUARD_RIGHT) Game.field.Right_Rear = c1;
else if(p2 == fieldPositions.FRONT_GUARD_LEFT) Game.field.Left_Front = c1;
else if(p2 == fieldPositions.FRONT_GUARD_RIGHT) Game.field.Right_Front = c1;
c1.pos = p2;
c2.pos = p1;
Vector3 c1NewPos = Game.field.fieldInfo.GetPosition((int)c1.pos);
Vector3 c2NewPos = Game.field.fieldInfo.GetPosition((int)c2.pos);
c1.GoTo(c1NewPos.x, c1NewPos.z);
c2.GoTo(c2NewPos.x, c2NewPos.z);
}
示例3: FromDropToDeckUpdate
void FromDropToDeckUpdate(Void0ParamsDelegate DD_fnc)
{
if(DD_Active)
{
if(DD_Card == null || !DD_Card.AnimationOngoing())
{
if(DD_Card != null)
{
Game.field.RemoveFromDropzone(DD_Card);
if(DD_toBottom)
{
Game.playerDeck.AddToBottom(DD_Card);
}
else
{
Game.playerDeck.AddCard(DD_Card);
}
DD_Card.TurnDown();
}
if(DD_List.Count > 0)
{
DD_Card = Game.field.GetDropByID(DD_List[0]);
DD_List.RemoveAt(0);
Vector3 newPos = Game.field.fieldInfo.GetPosition((int)fieldPositions.DECK_ZONE);
DD_Card.GoTo(newPos.x, newPos.z);
Game.SendPacket(GameAction.FROM_DROP_TO_DECK, DD_Card.cardID);
}
else
{
DD_Active = false;
Game.field.FixDropZonePosition();
DD_fnc();
}
}
}
}
示例4: ReturnToDeck
public void ReturnToDeck(Card card)
{
Vector3 deck = fieldInfo.GetPosition((int)EnemyFieldPosition.DECK);
card.GoTo (deck.x, deck.z);
AddCard(card);
}
示例5: FromHandToSoul
public void FromHandToSoul(Card c, int handPosition)
{
SendPacket (GameAction.FROM_HAND_TO_SOUL, c.cardID, handPosition);
Vector3 newPos = fieldInfo.GetPosition((int)fieldPositions.VANGUARD_CIRCLE);
c.SetRotation(0, 180, 0);
c.GoTo(newPos.x, newPos.y, newPos.z);
}
示例6: ReturnToDeck
public void ReturnToDeck(Card card, bool bBottom = false)
{
Vector3 posDeck = fieldInfo.GetPosition((int)fieldPositions.DECK_ZONE);
card.GoTo(posDeck.x, posDeck.z);
AuxCard = card;
bCardReturningToDeck = true;
if(!bBottom)
{
AddCard(card);
}
else
{
AddToBottom(card);
}
}
示例7: Update
//.........这里部分代码省略.........
stateDynamicText.SetText("END PHASE");
SendPacket(GameAction.DYNAMICTEXT_GAMEPHASE, "END PHASE");
//stateDynamicText.SetText("END PHASE");
SendGameChatMessage("Turn end.", ChatTab.GAME);
}
}
if(bIsCardAtHandShowing)
{
ShowingCardAtHandTimer -= Time.deltaTime;
if(ShowingCardAtHandTimer <= 0.0f)
{
bIsCardAtHandShowing = false;
enemyHand.HideAllCards();
}
}
/*
if(Input.GetKeyDown(KeyCode.A))
{
SoulBlast(field.GetTopCardFromSoul());
field.RemoveFromSoulByCard(field.GetTopCardFromSoul());
}
*/
UpdateDiscardEvent();
_MouseHelper.Update();
if(SoulBlastCard == null && EnemySoulBlastQueue.Count > 0)
{
SoulBlastCard = EnemySoulBlastQueue[EnemySoulBlastQueue.Count - 1];
EnemySoulBlastQueue.RemoveAt(EnemySoulBlastQueue.Count - 1);
Vector3 newPosition = EnemyFieldInfo.GetPosition((int)EnemyFieldPosition.DROP);
SoulBlastCard.GoTo(newPosition.x, newPosition.y, newPosition.z);
}
if(SoulBlastCard != null)
{
if(!SoulBlastCard.AnimationOngoing())
{
enemyField.RemoveFromSoul(SoulBlastCard);
enemyField.AddToDropZone(SoulBlastCard, false);
SoulBlastCard = null;
}
}
if(FromHandToSoulCard != null)
{
if(!FromHandToSoulCard.AnimationOngoing())
{
enemyHand.RemoveFromHand(FromHandToSoulCard);
enemyField.AddToSoul(FromHandToSoulCard);
FromHandToSoulCard = null;
}
}
if(DD_Card != null)
{
if(!DD_Card.AnimationOngoing())
{
enemyField.RemoveFromDropZone(DD_Card);
enemyDeck.AddCard(DD_Card);
DD_Card.TurnDown();
DD_Card = null;
}
}
示例8: 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;
//.........这里部分代码省略.........
示例9: SoulBlast
public void SoulBlast(Card card)
{
//SoulBlastCardAlly = card;
Vector3 newPosition = fieldInfo.GetPosition((int)fieldPositions.DROP_ZONE);
card.GoTo(newPosition.x, newPosition.y, newPosition.z);
SendPacket(GameAction.SOULBLAST, card.cardID);
}
示例10: Move
public void Move(Card card)
{
if(card.pos == fieldPositions.ENEMY_FRONT_LEFT)
{
Vector3 RearLeftPos = fieldInfo.GetPosition((int)Util.TransformToEquivalentEnemyPosition(fieldPositions.ENEMY_REAR_LEFT));
Vector3 FrontLeftPos = fieldInfo.GetPosition((int)Util.TransformToEquivalentEnemyPosition(fieldPositions.ENEMY_FRONT_LEFT));
if(Left_Rear != null)
{
Left_Front = Left_Rear;
Left_Rear = card;
Left_Front.pos = fieldPositions.ENEMY_FRONT_LEFT;
Left_Rear.pos = fieldPositions.ENEMY_REAR_LEFT;
Left_Front.GoTo(FrontLeftPos.x, FrontLeftPos.z);
Left_Rear.GoTo(RearLeftPos.x, RearLeftPos.z);
}
else
{
Left_Rear = card;
Left_Rear.pos = fieldPositions.ENEMY_REAR_LEFT;
Left_Rear.GoTo(RearLeftPos.x, RearLeftPos.z);
ClearZone(Util.TransformToEquivalentEnemyPosition(fieldPositions.ENEMY_FRONT_LEFT));
}
}
else if(card.pos == fieldPositions.ENEMY_REAR_LEFT)
{
Vector3 RearLeftPos = fieldInfo.GetPosition((int)Util.TransformToEquivalentEnemyPosition(fieldPositions.ENEMY_REAR_LEFT));
Vector3 FrontLeftPos = fieldInfo.GetPosition((int)Util.TransformToEquivalentEnemyPosition(fieldPositions.ENEMY_FRONT_LEFT));
if(Left_Front != null)
{
Left_Rear = Left_Front;
Left_Front = card;
Left_Front.pos = fieldPositions.ENEMY_FRONT_LEFT;
Left_Rear.pos = fieldPositions.ENEMY_REAR_LEFT;
Left_Front.GoTo(FrontLeftPos.x, FrontLeftPos.z);
Left_Rear.GoTo(RearLeftPos.x, RearLeftPos.z);
}
else
{
Left_Front = card;
Left_Front.pos = fieldPositions.ENEMY_FRONT_LEFT;
Left_Front.GoTo(FrontLeftPos.x, FrontLeftPos.z);
ClearZone(Util.TransformToEquivalentEnemyPosition(fieldPositions.ENEMY_REAR_LEFT));
}
}
else if(card.pos == fieldPositions.ENEMY_FRONT_RIGHT)
{
Vector3 RearRightPos = fieldInfo.GetPosition((int)Util.TransformToEquivalentEnemyPosition(fieldPositions.ENEMY_REAR_RIGHT));
Vector3 FrontRightPos = fieldInfo.GetPosition((int)Util.TransformToEquivalentEnemyPosition(fieldPositions.ENEMY_FRONT_RIGHT));
if(Right_Rear != null)
{
Right_Front = Right_Rear;
Right_Rear = card;
Right_Front.pos = fieldPositions.ENEMY_FRONT_RIGHT;
Right_Rear.pos = fieldPositions.ENEMY_REAR_RIGHT;
Right_Front.GoTo(FrontRightPos.x, FrontRightPos.z);
Right_Rear.GoTo(RearRightPos.x, RearRightPos.z);
}
else
{
Right_Rear = card;
Right_Rear.pos = fieldPositions.ENEMY_REAR_RIGHT;
Right_Rear.GoTo(RearRightPos.x, RearRightPos.z);
ClearZone(Util.TransformToEquivalentEnemyPosition(fieldPositions.ENEMY_FRONT_RIGHT));
}
}
else if(card.pos == fieldPositions.ENEMY_REAR_RIGHT)
{
Vector3 RearRightPos = fieldInfo.GetPosition((int)Util.TransformToEquivalentEnemyPosition(fieldPositions.ENEMY_REAR_RIGHT));
Vector3 FrontRightPos = fieldInfo.GetPosition((int)Util.TransformToEquivalentEnemyPosition(fieldPositions.ENEMY_FRONT_RIGHT));
if(Right_Front != null)
{
Right_Rear = Right_Front;
Right_Front = card;
Right_Front.pos = fieldPositions.ENEMY_FRONT_RIGHT;
Right_Rear.pos = fieldPositions.ENEMY_REAR_RIGHT;
Right_Front.GoTo(FrontRightPos.x, FrontRightPos.z);
Right_Rear.GoTo(RearRightPos.x, RearRightPos.z);
}
else
{
Right_Front = card;
Right_Front.pos = fieldPositions.ENEMY_FRONT_RIGHT;
Right_Front.GoTo(FrontRightPos.x, FrontRightPos.z);
ClearZone(Util.TransformToEquivalentEnemyPosition(fieldPositions.ENEMY_REAR_RIGHT));
}
}
}
示例11: Move
public void Move(Card card)
{
_Game.SendPacket(GameAction.MOVE_ALLY, card.pos);
if(card.pos == fieldPositions.FRONT_GUARD_LEFT)
{
Vector3 RearLeftPos = fieldInfo.GetPosition((int)fieldPositions.REAR_GUARD_LEFT);
Vector3 FrontLeftPos = fieldInfo.GetPosition((int)fieldPositions.FRONT_GUARD_LEFT);
if(Left_Rear != null)
{
Left_Front = Left_Rear;
Left_Rear = card;
Left_Front.pos = fieldPositions.FRONT_GUARD_LEFT;
Left_Rear.pos = fieldPositions.REAR_GUARD_LEFT;
Left_Front.GoTo(FrontLeftPos.x, FrontLeftPos.z);
Left_Rear.GoTo(RearLeftPos.x, RearLeftPos.z);
}
else
{
Left_Rear = card;
Left_Rear.pos = fieldPositions.REAR_GUARD_LEFT;
Left_Rear.GoTo(RearLeftPos.x, RearLeftPos.z);
ClearZone(fieldPositions.FRONT_GUARD_LEFT);
}
}
else if(card.pos == fieldPositions.REAR_GUARD_LEFT)
{
Vector3 RearLeftPos = fieldInfo.GetPosition((int)fieldPositions.REAR_GUARD_LEFT);
Vector3 FrontLeftPos = fieldInfo.GetPosition((int)fieldPositions.FRONT_GUARD_LEFT);
if(Left_Front != null)
{
Left_Rear = Left_Front;
Left_Front = card;
Left_Front.pos = fieldPositions.FRONT_GUARD_LEFT;
Left_Rear.pos = fieldPositions.REAR_GUARD_LEFT;
Left_Front.GoTo(FrontLeftPos.x, FrontLeftPos.z);
Left_Rear.GoTo(RearLeftPos.x, RearLeftPos.z);
}
else
{
Left_Front = card;
Left_Front.pos = fieldPositions.FRONT_GUARD_LEFT;
Left_Front.GoTo(FrontLeftPos.x, FrontLeftPos.z);
ClearZone(fieldPositions.REAR_GUARD_LEFT);
}
}
else if(card.pos == fieldPositions.FRONT_GUARD_RIGHT)
{
Vector3 RearRightPos = fieldInfo.GetPosition((int)fieldPositions.REAR_GUARD_RIGHT);
Vector3 FrontRightPos = fieldInfo.GetPosition((int)fieldPositions.FRONT_GUARD_RIGHT);
if(Right_Rear != null)
{
Right_Front = Right_Rear;
Right_Rear = card;
Right_Front.pos = fieldPositions.FRONT_GUARD_RIGHT;
Right_Rear.pos = fieldPositions.REAR_GUARD_RIGHT;
Right_Front.GoTo(FrontRightPos.x, FrontRightPos.z);
Right_Rear.GoTo(RearRightPos.x, RearRightPos.z);
}
else
{
Right_Rear = card;
Right_Rear.pos = fieldPositions.REAR_GUARD_RIGHT;
Right_Rear.GoTo(RearRightPos.x, RearRightPos.z);
ClearZone(fieldPositions.FRONT_GUARD_RIGHT);
}
}
else if(card.pos == fieldPositions.REAR_GUARD_RIGHT)
{
Vector3 RearRightPos = fieldInfo.GetPosition((int)fieldPositions.REAR_GUARD_RIGHT);
Vector3 FrontRightPos = fieldInfo.GetPosition((int)fieldPositions.FRONT_GUARD_RIGHT);
if(Right_Front != null)
{
Right_Rear = Right_Front;
Right_Front = card;
Right_Front.pos = fieldPositions.FRONT_GUARD_RIGHT;
Right_Rear.pos = fieldPositions.REAR_GUARD_RIGHT;
Right_Front.GoTo(FrontRightPos.x, FrontRightPos.z);
Right_Rear.GoTo(RearRightPos.x, RearRightPos.z);
}
else
{
Right_Front = card;
Right_Front.pos = fieldPositions.FRONT_GUARD_RIGHT;
Right_Front.GoTo(FrontRightPos.x, FrontRightPos.z);
ClearZone(fieldPositions.REAR_GUARD_RIGHT);
}
}
}