internal void AddCard(CardGameobject card) { gameState.PlayerDiscard.Add(card); card.Interactable(false); animQueue.EnqueueAction(MoveCardToDiscardAnimation(card)); animQueue.EnqueueWait(0.1f); }
public IEnumerator MoveCardToHandAnimation(CardGameobject card) { cardsInHand.Add(card); card.FX.FlipCard(); card.Interactable(true); card.SetSortOrder(20); UpdatePlayables(); yield return(null); }
public IEnumerator Fade(CardGameobject card) { for (float t = 0.0f; t < 1f; t += Time.deltaTime * (1f)) { card.FX.Alpha(t); yield return(null); } }
public IEnumerator MoveCardToDiscardAnimation(CardGameobject card) { cardsInDiscard.Add(card); card.SetCardPositionTarget(new Vector2(transform.position.x + UnityEngine.Random.Range(-0.1f, 0.1f), transform.position.y + UnityEngine.Random.Range(-0.1f, 0.1f))); card.SetCardRotationTarget(Quaternion.AngleAxis(UnityEngine.Random.Range(-5f, 5f), Vector3.forward) * Quaternion.identity); card.HighlightPlayable(false); StartCoroutine(Fade(card)); yield return(null); }
public IEnumerator MoveCardToDeckAnimation(CardGameobject card) { Vector2 pos = transform.position; card.SetCardPositionTarget(pos + deckPositions[cardsInDeck]); card.SetCardRotationTarget(Quaternion.identity); card.SetSortOrder((50 - cardsInDeck) * -1); // card.FX.FlipCard(); cardsInDeck++; yield return(null); }
private IEnumerator ShuffleAnimation(CardGameobject card) { Vector2 pos = transform.position; card.SetCardPositionTarget(pos + deckPositions[cardsInDeck]); card.SetSortOrder((50 - cardsInDeck) * -1); // card.FX.ShakeCard(card, 0.5f); cardsInDeck++; yield return(null); }
public override void ApplyEffect(CardGameobject card) { }
public override IEnumerator EffectAnimation(CardGameobject card) { yield return(new WaitForSeconds(0.1f)); yield return(null); }
public override void ApplyEffect(CardGameobject card) { // CardGame.PlayerEffectZone.UpdateEffect(PlayerEffectZone.PlayerEffect.Armor, armorValue); }
public virtual IEnumerator EffectAnimation(CardGameobject card) { yield return(null); }
public virtual void ApplyEffect(CardGameobject card) { }
internal void ReleaseCard(CardGameobject cardGameObject) { gameState.PlayerHand.Add(cardGameObject); cardsInHand.Insert(draggedCardPos, cardGameObject); }
internal void DragCard(CardGameobject cardGameObject) { draggedCardPos = cardsInHand.IndexOf(cardGameObject); RemoveCard(cardGameObject); }
internal void RemoveCard(CardGameobject cardGameObject) { gameState.PlayerHand.Remove(cardGameObject); cardsInHand.Remove(cardGameObject); }
internal void AddCard(CardGameobject card) { gameState.PlayerDeck.Add(card); animQueue.EnqueueAction(MoveCardToDeckAnimation(card)); animQueue.EnqueueWait(0.1f); }
public override void ApplyEffect(CardGameobject card) { card.GetTarget().TakeDamage(damageValue, hitEffect); }
internal void AddCard(CardGameobject card) { gameState.PlayerHand.Add(card); animQueue.EnqueueAction(MoveCardToHandAnimation(card)); animQueue.EnqueueWait(0.3f); }