コード例 #1
0
 internal void AddCard(CardGameobject card)
 {
     gameState.PlayerDiscard.Add(card);
     card.Interactable(false);
     animQueue.EnqueueAction(MoveCardToDiscardAnimation(card));
     animQueue.EnqueueWait(0.1f);
 }
コード例 #2
0
 public IEnumerator MoveCardToHandAnimation(CardGameobject card)
 {
     cardsInHand.Add(card);
     card.FX.FlipCard();
     card.Interactable(true);
     card.SetSortOrder(20);
     UpdatePlayables();
     yield return(null);
 }
コード例 #3
0
    public IEnumerator Fade(CardGameobject card)
    {
        for (float t = 0.0f; t < 1f; t += Time.deltaTime * (1f))
        {
            card.FX.Alpha(t);

            yield return(null);
        }
    }
コード例 #4
0
    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);
    }
コード例 #5
0
    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);
    }
コード例 #6
0
    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);
    }
コード例 #7
0
 public override void ApplyEffect(CardGameobject card)
 {
 }
コード例 #8
0
    public override IEnumerator EffectAnimation(CardGameobject card)
    {
        yield return(new WaitForSeconds(0.1f));

        yield return(null);
    }
コード例 #9
0
 public override void ApplyEffect(CardGameobject card)
 {
     // CardGame.PlayerEffectZone.UpdateEffect(PlayerEffectZone.PlayerEffect.Armor, armorValue);
 }
コード例 #10
0
 public virtual IEnumerator EffectAnimation(CardGameobject card)
 {
     yield return(null);
 }
コード例 #11
0
 public virtual void ApplyEffect(CardGameobject card)
 {
 }
コード例 #12
0
 internal void ReleaseCard(CardGameobject cardGameObject)
 {
     gameState.PlayerHand.Add(cardGameObject);
     cardsInHand.Insert(draggedCardPos, cardGameObject);
 }
コード例 #13
0
 internal void DragCard(CardGameobject cardGameObject)
 {
     draggedCardPos = cardsInHand.IndexOf(cardGameObject);
     RemoveCard(cardGameObject);
 }
コード例 #14
0
 internal void RemoveCard(CardGameobject cardGameObject)
 {
     gameState.PlayerHand.Remove(cardGameObject);
     cardsInHand.Remove(cardGameObject);
 }
コード例 #15
0
 internal void AddCard(CardGameobject card)
 {
     gameState.PlayerDeck.Add(card);
     animQueue.EnqueueAction(MoveCardToDeckAnimation(card));
     animQueue.EnqueueWait(0.1f);
 }
コード例 #16
0
 public override void ApplyEffect(CardGameobject card)
 {
     card.GetTarget().TakeDamage(damageValue, hitEffect);
 }
コード例 #17
0
 internal void AddCard(CardGameobject card)
 {
     gameState.PlayerHand.Add(card);
     animQueue.EnqueueAction(MoveCardToHandAnimation(card));
     animQueue.EnqueueWait(0.3f);
 }