private void animateBattleToHandOwn(int cardIndex) { Models.CardGUIModel card; Animations.MoveAnimation animation; // select origin and create destination card = listOwnBattleGround[cardIndex]; if ((Phase == "Mana phase" || Phase == "Summon phase") && itIsOwnTurn) { ableToSelect.Add(card); } if (card.Card.isEngaged) { Animations.RotateAnimation rotateAnimation = new Animations.RotateAnimation(false); rotateAnimation.border = card.Border; addEvent(new Event(rotateAnimation)); } card.Card.resetProperties(); animation = new Animations.MoveAnimation(grdOwnBattle, grdHand, grdParent, listOwnBattleGround, listHand, card, AnimationAndEventsConstants.DESTINATIONOWNHAND); addEvent(new Event(animation)); }
private void animateBattleToHandOpp(int cardIndex) { Models.CardGUIModel card; Animations.MoveAnimation animation; // select origin and create destination card = listOppBattleGround[cardIndex]; if (card.Card.isEngaged) { Animations.RotateAnimation rotateAnimation = new Animations.RotateAnimation(false); rotateAnimation.border = card.Border; addEvent(new Event(rotateAnimation)); } animation = new Animations.MoveAnimation(grdOppBattle, grdParent, grdParent, listOppBattleGround, null, card, AnimationAndEventsConstants.DESTINATIONOPPHAND); animation.removeOrigin = true; addEvent(new Event(animation)); }
// Special Effects private void animateManaToHandOpp(int cardIndex) { Models.CardGUIModel card; Animations.MoveAnimation animation; List <Event> events; events = new List <Event>(); // select origin card = listOppManaZone[cardIndex]; if (card.Card.isEngaged) { Animations.RotateAnimation rotateAnimation = new Animations.RotateAnimation(false); rotateAnimation.border = card.Border; events.Add(new Event(rotateAnimation)); } animation = new Animations.MoveAnimation( grdOppMana, grdParent, grdParent, listOppManaZone, null, card, AnimationAndEventsConstants.DESTINATIONOPPHAND); animation.removeOrigin = true; events.Add(new Event(animation)); addEvents(events); }
private void animateManaToGraveOwn(int cardIndex) { Models.CardGUIModel card; Animations.MoveAnimation animation; List <Event> events; events = new List <Event>(); // select origin card = listOwnManaZone[cardIndex]; if (card.Card.isEngaged) { Animations.RotateAnimation rotateAnimation = new Animations.RotateAnimation(false); rotateAnimation.border = card.Border; events.Add(new Event(rotateAnimation)); } animation = new Animations.MoveAnimation( grdOwnMana, grdOwnGrave, grdParent, listOwnManaZone, listOwnGraveyard, card, AnimationAndEventsConstants.DESTINATIONGRAVE); events.Add(new Event(animation)); addEvents(events); }
private void animateEngageBattleOPP(Models.CardGUIModel cardGUI) { Animations.RotateAnimation rotateAnimation = new Animations.RotateAnimation(true); rotateAnimation.border = cardGUI.Border; addEvent(new Event(rotateAnimation)); }
private void animateEngageBattleOWN(int cardIndex) { Animations.RotateAnimation rotateAnimation = new Animations.RotateAnimation(true); rotateAnimation.border = listOwnBattleGround[cardIndex].Border; addEvent(new Event(rotateAnimation)); }
private void animateBattleToMana(int cardIndex, bool own) { Models.CardGUIModel card; Animations.MoveAnimation moveAnimation; Animations.RotateAnimation rotateAnimation; List <Event> events; events = new List <Event>(); // select origin and create destination card = own == OWN ? listOwnBattleGround[cardIndex] : listOppBattleGround[cardIndex]; moveAnimation = new Animations.MoveAnimation( own == OWN ? grdOwnBattle : grdOppBattle, own == OWN ? grdOwnMana : grdOppMana, grdParent, own == OWN ? listOwnBattleGround : listOppBattleGround, own == OWN ? listOwnManaZone : listOppManaZone, card, AnimationAndEventsConstants.DESTINATIONMANA); if (card.Card.isEngaged) { rotateAnimation = new Animations.RotateAnimation(false); rotateAnimation.border = card.Border; events.Add(new Event(rotateAnimation)); } card.Card.resetProperties(); events.Add(new Event(moveAnimation)); addEvents(events); }
private void animateEngageManaOPP(List <int> selectedMana) { Animations.RotateAnimation rotateAnimation; foreach (int index in selectedMana) { rotateAnimation = new Animations.RotateAnimation(true); rotateAnimation.border = listOppManaZone[index].Border; addEvent(new Event(rotateAnimation)); } }
private void animateBattleToGraveyard(int cardIndex, bool own) { Models.CardGUIModel card; Animations.MoveAnimation moveAnimation; Animations.RotateAnimation rotateAnimation; List <Event> events; events = new List <Event>(); // select origin and create destination if (own) { card = listOwnBattleGround[cardIndex]; moveAnimation = new Animations.MoveAnimation( grdOwnBattle, grdOwnGrave, grdParent, listOwnBattleGround, listOwnGraveyard, card, AnimationAndEventsConstants.DESTINATIONGRAVE); } else { card = listOppBattleGround[cardIndex]; moveAnimation = new Animations.MoveAnimation( grdOppBattle, grdOppGrave, grdParent, listOppBattleGround, listOppGraveyard, card, AnimationAndEventsConstants.DESTINATIONGRAVE); } if (card.Card.isEngaged) { rotateAnimation = new Animations.RotateAnimation(false); rotateAnimation.border = card.Border; events.Add(new Event(rotateAnimation)); } card.Card.resetProperties(); events.Add(new Event(moveAnimation)); addEvents(events); }
private void animateDisengageBattleOPP() { int count; Animations.RotateAnimation rotateAnimation; count = 0; foreach (Models.CardGUIModel cardGUI in listOppBattleGround) { if (cardGUI.Card.isEngaged) { rotateAnimation = new Animations.RotateAnimation(false); rotateAnimation.border = cardGUI.Border; rotateAnimation.setSpeed(100); addEvent(new Event(rotateAnimation)); count++; } } }
private void animateDisengageManaOPP() { int count; Animations.RotateAnimation rotateAnimation; count = 0; foreach (Models.CardGUIModel cardGUI in listOppManaZone) { if (cardGUI.Card.isEngaged) { rotateAnimation = new Animations.RotateAnimation(false); rotateAnimation.border = cardGUI.Border; rotateAnimation.setSpeed(100); addAnimation(rotateAnimation); count++; } } }