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; }
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; }
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); }
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); }
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); } }
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); }
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); }
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); } }
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); }