added webrtc, pre-4.3 update to fix cyclic dependency

This commit is contained in:
Sch1nken 2024-03-15 18:05:58 +01:00
parent 26fec25a6e
commit e8cd148bc7
45 changed files with 1498 additions and 43 deletions

44
main_menu.gd Normal file
View file

@ -0,0 +1,44 @@
extends Control
const WEBSOCKET_ENDPOINT: String = "wss://dev.bytesandpieces.xyz:9088"
const insect_resources = [
preload("res://Tile/Prefabs/Ant.tres"),
preload("res://Tile/Prefabs/Bee.tres"),
preload("res://Tile/Prefabs/Beetle.tres"),
preload("res://Tile/Prefabs/Grasshopper.tres"),
preload("res://Tile/Prefabs/Ladybug.tres"),
preload("res://Tile/Prefabs/Mosquito.tres"),
preload("res://Tile/Prefabs/Pillbug.tres"),
preload("res://Tile/Prefabs/Spider.tres")
]
var insect_data = {
}
func prepare_insect_data() -> void:
var c: int = 65
#for i in insect_resources:
#for k in 2:
#print(String.chr(c))
#c = c + 1
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
prepare_insect_data()
WSClient.lobby_joined.connect(_on_lobby_joined)
func _on_lobby_joined(lobby: String) -> void:
pass
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _on_button_pressed() -> void:
WSClient.start(WEBSOCKET_ENDPOINT, "", false)
pass # Replace with function body.