Exemple #1
0
    public void cardGotClicked(baseCard clickedCard)
    {
        var userInput = GetNode <UserInput>("/root/UserInput");

        GD.Print("hand: ", clickedCard, " got clicked");
        userInput.CallDeferred("cardGotClicked", this, clickedCard);
    }
Exemple #2
0
    //input handling of baseCard Child
    public void cardGotClicked(baseCard clickedCard)
    {
        var userInput = GetNode <UserInput>("/root/UserInput");

        GD.Print("hand: ", clickedCard, " got clicked");
        if (session.currentPhase == session.Phase.PLAY)
        {
            userInput.CallDeferred("cardGotClicked", this, clickedCard);
        }
    }
Exemple #3
0
 public void cardGotClicked(Node where, baseCard what)
 {
     if (where is player_hand)
     {
         GD.Print(what, " got clicked in player hand");
         if (currentSession.currentPhase == session.Phase.PLAY && where.Name == "player_hand")
         {
             //hardcode to player1
             currentSession.player.Rpc("handToField", what.cardId);
         }
     }
 }
Exemple #4
0
 public void playCardOnSubjugator(baseCard card)
 {
     GetNode("slots").GetNode("slot2").AddChild(card);
 }
Exemple #5
0
 public void playCardOnField(baseCard card)
 {
     GetNode("slots").GetNode("slot1").AddChild(card);
 }
Exemple #6
0
 //takes playerRole and corresponding slot and assign card
 //game field is not responsible about how player_data gets assigned
 public void updateSlot(string player, string slot, baseCard card)
 {
     GetNode(player).GetNode("slots").GetNode(slot).AddChild(card);
 }
Exemple #7
0
 public void addCardToHand(baseCard newCard)
 {
     AddChild(newCard);
     arrangeHandCards();
 }