More work on multiplayer and first pass of the trap icons
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
extends Control
|
||||
extends MultiplayerSpawner
|
||||
|
||||
var host : bool
|
||||
var handle : String
|
||||
|
||||
func _ready() -> void:
|
||||
Multiplayer.client_added.connect(_on_client_added)
|
||||
|
||||
func _on_host_game_button_pressed() -> void:
|
||||
%Menu.visible = false
|
||||
%Hosting.visible = true
|
||||
@@ -38,7 +42,7 @@ func _on_hosting_back_button_pressed() -> void:
|
||||
|
||||
|
||||
func _on_start_game_button_pressed() -> void:
|
||||
Game.start_vs_com()
|
||||
Game.start_vs_man()
|
||||
|
||||
|
||||
func _on_waiting_back_button_pressed() -> void:
|
||||
@@ -59,8 +63,12 @@ func _on_join_button_pressed() -> void:
|
||||
%Joining.visible = false
|
||||
if Multiplayer.join_game(handle):
|
||||
%"Host Waiting".visible = true
|
||||
|
||||
%StartButton.visible = false
|
||||
|
||||
func _on_joining_back_button_pressed() -> void:
|
||||
%Joining.visible = false
|
||||
%Menu.visible = true
|
||||
|
||||
func _on_client_added(peer_handle : String, peer_id : int) -> void:
|
||||
%ParticipantsText.text = "[color=FFFF00][b]*%s[/b][/color]\n[color=FFFFFF]*%s[/color]" % [handle, peer_handle]
|
||||
%StartButton.disabled = false
|
||||
|
||||
Reference in New Issue
Block a user