Working prototype
This commit is contained in:
parent
3de181134d
commit
1ed0ec226d
24 changed files with 682 additions and 31 deletions
11
main_menu.gd
11
main_menu.gd
|
|
@ -2,7 +2,8 @@ extends Control
|
|||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
WSClient.lobby_joined.connect(_on_lobby_joined)
|
||||
WSClient.lobby_joined.connect(_on_lobby_joined)
|
||||
GameData.reset()
|
||||
|
||||
func _on_lobby_joined(lobby: String) -> void:
|
||||
GameData.lobby_code = lobby
|
||||
|
|
@ -15,7 +16,7 @@ func _process(delta: float) -> void:
|
|||
|
||||
func _on_host_button_pressed():
|
||||
GameData.is_player_black = false
|
||||
WSClient.start(GameData.WEBSOCKET_ENDPOINT, "")
|
||||
WSClient.start(GameData.WEBSOCKET_ENDPOINT, "", false)
|
||||
|
||||
|
||||
func _on_join_button_pressed():
|
||||
|
|
@ -24,3 +25,9 @@ func _on_join_button_pressed():
|
|||
|
||||
func _on_exit_button_pressed():
|
||||
get_tree().quit()
|
||||
|
||||
|
||||
func _on_rules_button_pressed():
|
||||
# https://bacon.bytesandpieces.xyz/swarm/
|
||||
OS.shell_open("https://www.ultraboardgames.com/hive/game-rules.php")
|
||||
pass # Replace with function body.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue