Ejemplo n.º 1
0
    public void DrawCardAt(int slot)
    {
        if (slot == 0 || Hand.GetCardAtSlot(slot) != null)
        {
            return;
        }

        var newcard = Deck.Draw();

        if (newcard == null)
        {
            // play error tone, display empty deck
            DeselectAll();
            return;
        }


        Debug.Log($"Drawing card into {slot}");
        if (slot == 0)
        {
            // play error tone
            return;
        }

        Hand.InsertCardAtSlot(slot, newcard);

        RedrawAll();
        DeselectAll();
    }
Ejemplo n.º 2
0
    public void SelectEquipSlot()
    {
        Debug.Log("Equip Select");

        var card = Hand.RemoveCardAtSlot(SelectedHandSlot);

        Equips.InsertCardAtSlot(1, card);
        DeselectAll();
        RedrawAll();
    }
Ejemplo n.º 3
0
    public void SelectCombineSlot(int slot)
    {
        if (SelectedHandSlot == 0 ||
            Combines.GetCardAtSlot(slot) != null)
        {
            return;
        }

        Debug.Log($"Combine Select ({slot})");

        var card = Hand.RemoveCardAtSlot(SelectedHandSlot);

        Combines.InsertCardAtSlot(slot, card);
        DeselectAll();
        RedrawAll();
    }