First commit
This commit is contained in:
54
scripts/multiplayer_setup.gd
Normal file
54
scripts/multiplayer_setup.gd
Normal file
@@ -0,0 +1,54 @@
|
||||
extends Control
|
||||
|
||||
var host : bool
|
||||
|
||||
func _on_host_game_button_pressed() -> void:
|
||||
%Menu.visible = false
|
||||
%Hosting.visible = true
|
||||
host = true
|
||||
|
||||
|
||||
func _on_join_game_button_pressed() -> void:
|
||||
%Menu.visible = false
|
||||
%Joining.visible = true
|
||||
host = false
|
||||
|
||||
|
||||
func _on_menu_back_button_pressed() -> void:
|
||||
Game.go_to_title_screen()
|
||||
|
||||
|
||||
func _on_start_hosting_button_pressed() -> void:
|
||||
#Validate entries
|
||||
%Hosting.visible = false
|
||||
#Set fields
|
||||
%"Host Waiting".visible = true
|
||||
|
||||
|
||||
func _on_hosting_back_button_pressed() -> void:
|
||||
%Hosting.visible = false
|
||||
%Menu.visible = true
|
||||
|
||||
|
||||
func _on_start_game_button_pressed() -> void:
|
||||
Game.start_vs_com()
|
||||
|
||||
|
||||
func _on_waiting_back_button_pressed() -> void:
|
||||
%"Host Waiting".visible = false
|
||||
if host:
|
||||
%Hosting.visible = true
|
||||
else:
|
||||
%Joining.visible = true
|
||||
|
||||
|
||||
func _on_join_button_pressed() -> void:
|
||||
#Check for valid game
|
||||
#If found
|
||||
%Joining.visible = false
|
||||
%"Host Waiting".visible = true
|
||||
|
||||
|
||||
func _on_joining_back_button_pressed() -> void:
|
||||
%Joining.visible = false
|
||||
%Menu.visible = true
|
||||
Reference in New Issue
Block a user