Skip to content

Commit

Permalink
Merge pull request #162 from rafaelcastrocouto/main
Browse files Browse the repository at this point in the history
v0.5
  • Loading branch information
rafaelcastrocouto authored Dec 11, 2022
2 parents acffef0 + fa28794 commit cf57948
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
5 changes: 3 additions & 2 deletions prototype/game.gd
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,13 @@ func exit():

func reload():
EventMachine.reset()
# warning-ignore:return_value_discarded
get_tree().reload_current_scene()
Hud._ready()
Behavior._ready()


func start(red_team_leaders, blue_team_leaders, _player_team, map):
func start(red_team_leaders, blue_team_leaders, _player_team, map_index):
player_team = _player_team
if player_team == "blue":
player_choose_leaders = blue_team_leaders
Expand All @@ -175,7 +176,7 @@ func start(red_team_leaders, blue_team_leaders, _player_team, map):
player_choose_leaders = red_team_leaders
enemy_choose_leaders = blue_team_leaders

if map == 1:
if map_index == 1:
maps.current_map = "1lane_map"
else:
maps.current_map = "3lane_map"
Expand Down
3 changes: 3 additions & 0 deletions prototype/ui/pause_menu.gd
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ onready var exit_to_menu_button : Button = $"%exit_to_menu_button"
onready var exit_button : Button = $"%exit_button"

func _ready():
# warning-ignore:return_value_discarded
continue_button.connect("pressed", game, "resume")
# warning-ignore:return_value_discarded
exit_to_menu_button.connect("pressed", game, "reload")
# warning-ignore:return_value_discarded
exit_button.connect("pressed", game, "exit")
1 change: 1 addition & 0 deletions prototype/ui/team_selection/leader_select_menu_panel.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ var leader:String = "random"
var team:String = 'red'

signal select_leader()
# warning-ignore:unused_signal
signal remove_leader()

func prepare():
Expand Down
1 change: 1 addition & 0 deletions prototype/ui/team_selection/leader_select_panel.gd
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ onready var leader_grid = $VBoxContainer/CenterContainer/GridContainer
func _ready():
for child in leader_grid.get_children():
leader_grid.remove_child(child)
child.queue_free()
for leader in autoload.leaders:
var button = leader_select_button.instance()
button.prepare(leader)
Expand Down
1 change: 1 addition & 0 deletions prototype/ui/team_selection/team_selection_menu.gd
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ func _ready():
for container in [blue_team_container, red_team_container]:
for child in container.get_children():
container.remove_child(child)
child.queue_free()


func handle_add_leader_blue():
Expand Down
21 changes: 11 additions & 10 deletions prototype/ui/ui.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,17 @@ __meta__ = {
[node name="leaders_icons" parent="mid_left" instance=ExtResource( 12 )]
unique_name_in_owner = true

[node name="CheatConsole" type="TextEdit" parent="mid_left"]
pause_mode = 2
visible = false
margin_left = 3.0
margin_top = -210.0
margin_right = 130.0
margin_bottom = -193.0
context_menu_enabled = false
shortcut_keys_enabled = false
script = ExtResource( 19 )

[node name="bot_left" type="Control" parent="."]
visible = false
anchor_top = 1.0
Expand Down Expand Up @@ -142,13 +153,3 @@ unique_name_in_owner = true
pause_mode = 2
visible = false
mouse_filter = 1

[node name="CheatConsole" type="TextEdit" parent="."]
pause_mode = 2
margin_left = 3.0
margin_top = 90.0
margin_right = 130.0
margin_bottom = 107.0
context_menu_enabled = false
shortcut_keys_enabled = false
script = ExtResource( 19 )

0 comments on commit cf57948

Please sign in to comment.