Internet/Local/Hotseat working (still need to test for bugs). ALso get an RPC error because we switch scene...
This commit is contained in:
parent
c95b8186ab
commit
c4909db2a5
654 changed files with 18133 additions and 39 deletions
37
UI/Lobby/WebRTCLobby.gd
Normal file
37
UI/Lobby/WebRTCLobby.gd
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
extends Control
|
||||
|
||||
@onready var margin_container = $PanelContainer/MarginContainer
|
||||
@onready var web_rtc_host = $PanelContainer/MarginContainer/VBoxContainer2/WebRTCHost
|
||||
@onready var web_rtc_join = $PanelContainer/MarginContainer/VBoxContainer2/WebRTCJoin
|
||||
@onready var selection_menu = $PanelContainer/SelectionMenu
|
||||
|
||||
func _on_host_pressed():
|
||||
selection_menu.visible = false
|
||||
margin_container.visible = true
|
||||
web_rtc_host.show_panel()
|
||||
|
||||
|
||||
func _on_join_pressed():
|
||||
selection_menu.visible = false
|
||||
margin_container.visible = true
|
||||
web_rtc_join.show_panel()
|
||||
|
||||
|
||||
func _on_backto_main_menu_pressed():
|
||||
get_tree().change_scene_to_file("res://UI/main_menu.tscn")
|
||||
|
||||
|
||||
func _on_back_button_pressed():
|
||||
selection_menu.visible = true
|
||||
margin_container.visible = false
|
||||
selection_menu.visible = true
|
||||
|
||||
web_rtc_host.hide_panel()
|
||||
web_rtc_join.hide_panel()
|
||||
|
||||
@rpc("any_peer", "call_local")
|
||||
func load_game() -> void:
|
||||
get_tree().change_scene_to_file("res://Game.tscn")
|
||||
|
||||
func _on_start_game_button_pressed():
|
||||
load_game.rpc()
|
||||
Loading…
Add table
Add a link
Reference in a new issue