コード例 #1
0
ファイル: card_slot.cs プロジェクト: ns096/Kartenspiel
    public void cardGotClicked(baseCard clickedCard)
    {
        var userInput = GetNode <UserInput>("/root/UserInput");

        GD.Print("hand: ", clickedCard, " got clicked");
        userInput.CallDeferred("cardGotClicked", this, clickedCard);
    }
コード例 #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);
        }
    }
コード例 #3
0
ファイル: UserInput.cs プロジェクト: ns096/Kartenspiel
 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);
         }
     }
 }
コード例 #4
0
 public void playCardOnSubjugator(baseCard card)
 {
     GetNode("slots").GetNode("slot2").AddChild(card);
 }
コード例 #5
0
 public void playCardOnField(baseCard card)
 {
     GetNode("slots").GetNode("slot1").AddChild(card);
 }
コード例 #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);
 }
コード例 #7
0
 public void addCardToHand(baseCard newCard)
 {
     AddChild(newCard);
     arrangeHandCards();
 }