added webrtc, pre-4.3 update to fix cyclic dependency
This commit is contained in:
parent
26fec25a6e
commit
e8cd148bc7
45 changed files with 1498 additions and 43 deletions
19
BuildMenu.gd
19
BuildMenu.gd
|
|
@ -3,7 +3,6 @@ extends Control
|
|||
@onready var local_player_insects = $PanelContainer/MarginContainer/VBoxContainer/HBoxContainer2/LocalPlayerInsects
|
||||
@onready var remote_player_insects = $PanelContainer/MarginContainer/VBoxContainer/HBoxContainer2/RemotePlayerInsects
|
||||
|
||||
|
||||
const INSECT_BUTTON = preload("res://UI/insect_button.tscn")
|
||||
|
||||
const default_insects = {
|
||||
|
|
@ -17,22 +16,29 @@ const default_insects = {
|
|||
#preload("res://Tile/Prefabs/Pillbug.tres"): 1
|
||||
}
|
||||
|
||||
@onready var local_bee_button: InsectButton = $PanelContainer/MarginContainer/VBoxContainer/HBoxContainer2/LocalPlayerInsects/BeeButton
|
||||
@onready var remote_bee_button: InsectButton = $PanelContainer/MarginContainer/VBoxContainer/HBoxContainer2/RemotePlayerInsects/BeeButton
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
#var unique_array = default_insects.duplicate().map()
|
||||
local_bee_button.update_color(GameData.is_player_black)
|
||||
remote_bee_button.update_color(!GameData.is_player_black)
|
||||
|
||||
for key in default_insects.keys():
|
||||
print(default_insects[key])
|
||||
#print(default_insects[key])
|
||||
var btn = INSECT_BUTTON.instantiate()
|
||||
btn.insect_resource = key
|
||||
btn.tile_count = default_insects[key]
|
||||
btn.is_black = false
|
||||
btn.is_black = GameData.is_player_black
|
||||
local_player_insects.add_child(btn)
|
||||
|
||||
for key in default_insects.keys():
|
||||
var btn = INSECT_BUTTON.instantiate()
|
||||
btn.insect_resource = key
|
||||
btn.tile_count = default_insects[key]
|
||||
btn.is_black = true
|
||||
btn.is_black = !GameData.is_player_black
|
||||
remote_player_insects.add_child(btn)
|
||||
remote_player_insects.move_child(btn, 0)
|
||||
|
||||
|
|
@ -42,8 +48,3 @@ func _process(delta):
|
|||
GameEvents.insect_placement_cancelled.emit()
|
||||
pass
|
||||
pass
|
||||
|
||||
|
||||
func _on_bee_button_pressed():
|
||||
print("bsss")
|
||||
pass # Replace with function body.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue