本文整理汇总了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);
}
示例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;
}
}
示例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;
}
示例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);
}
示例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();
示例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);
}
}
}
示例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);
}