Ejemplo n.º 1
0
    public void SelectCard(byte index, CardVisual visual)
    {
        if (BattleScene.Instance.IsBusy())
        {
            if (CardInputMode)
            {
                InputIndex = index;
                EmitSignal(nameof(CardInput), index);
            }
            return;
        }

        if (visual == Selected)
        {
            DeselectCard();
            return;
        }
        // Unselect previous card
        DeselectCard();

        if (visual == null)
        {
            return;
        }

        Selected = visual;
        Selected.Pull(-50f);

        BattleScene.Instance.SealGlow(visual.Card.Data().Target);
    }
Ejemplo n.º 2
0
 public void DeselectCard()
 {
     if (Selected != null)
     {
         Selected.Pull(0f);
         Selected = null;
         BattleScene.Instance.SealGlow();
     }
 }