feat: user always play bottom
This commit is contained in:
parent
bebb7b467b
commit
2c4e9d90f3
5 changed files with 25 additions and 72 deletions
10
main.gd
10
main.gd
|
|
@ -58,24 +58,14 @@ func _ready() -> void:
|
|||
server_discovery.server_removed.connect(_on_server_removed)
|
||||
|
||||
demo_game.own_played_card.connect(func (card): _on_own_played_card.rpc(card.id if card else ""))
|
||||
demo_game.opponent_played_card.connect(func (card): _on_opponent_played_card.rpc(card.id if card else ""))
|
||||
demo_game.own_played_rts.connect(func (move): _on_own_played_rts.rpc(move))
|
||||
demo_game.opponent_played_rts.connect(func (move): _on_opponent_played_rts.rpc(move))
|
||||
|
||||
@rpc("any_peer", "call_remote", "reliable")
|
||||
func _on_own_played_card(card_id: String):
|
||||
demo_game.rpc_own_play_card(card_id)
|
||||
|
||||
@rpc("any_peer", "call_remote", "reliable")
|
||||
func _on_opponent_played_card(card_id: String):
|
||||
demo_game.rpc_opponent_play_card(card_id)
|
||||
|
||||
@rpc("any_peer", "call_remote", "reliable")
|
||||
func _on_own_played_rts(move: String):
|
||||
demo_game.rpc_own_rps_move(move)
|
||||
|
||||
@rpc("any_peer", "call_remote", "reliable")
|
||||
func _on_opponent_played_rts(move: String):
|
||||
demo_game.rpc_opponent_rps_move(move)
|
||||
|
||||
@rpc("authority", "call_local", "reliable")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue