This commit is contained in:
Alan Alexander Cerna 2021-11-14 15:30:22 +02:00
commit 634866060e
28 changed files with 814 additions and 134 deletions

View File

@ -9,6 +9,8 @@ var bullet
var username_text = load("res://source/scenes/OVERLAY/elements/username_text.tscn") var username_text = load("res://source/scenes/OVERLAY/elements/username_text.tscn")
var username setget username_set var username setget username_set
var username_text_instance = null var username_text_instance = null
var health_bar_scene = load("res://source/scenes/OVERLAY/elements/HUD.tscn")
var health_bar_instance = null
var hp = 100 setget set_hp var hp = 100 setget set_hp
var can_shoot = true var can_shoot = true
var is_reloading = false var is_reloading = false
@ -96,6 +98,8 @@ func _ready():
get_tree().connect("network_peer_connected", self, "_network_peer_connected") get_tree().connect("network_peer_connected", self, "_network_peer_connected")
username_text_instance = Global.instance_node_at_location(username_text, PersistentNodes, global_position) username_text_instance = Global.instance_node_at_location(username_text, PersistentNodes, global_position)
username_text_instance.player_following = self username_text_instance.player_following = self
health_bar_instance = Global.instance_node_at_location(health_bar_scene, PersistentNodes, global_position)
health_bar_instance.player_following = self
update_shoot_mode(false) update_shoot_mode(false)
Global.alive_players.append(self) Global.alive_players.append(self)
@ -421,14 +425,17 @@ func _on_hitbox_area_entered(area):
sync func hit_by_damager(damage): sync func hit_by_damager(damage):
hp -= damage hp -= damage
modulate = Color(5, 5, 5, 1) modulate = Color(5, 5, 5, 1)
health_bar_instance.value = hp
hit_timer.start() hit_timer.start()
sync func enable() -> void: sync func enable() -> void:
hp = 100 hp = 100
health_bar_instance.value = 100
can_shoot = false can_shoot = false
update_shoot_mode(false) update_shoot_mode(false)
username_text_instance.visible = true username_text_instance.visible = true
health_bar_instance.visible = true
visible = true visible = true
$player_collider.disabled = false $player_collider.disabled = false
$hitbox/CollisionShape2D.disabled = false $hitbox/CollisionShape2D.disabled = false
@ -444,6 +451,7 @@ sync func enable() -> void:
sync func destroy() -> void: sync func destroy() -> void:
username_text_instance.visible = false username_text_instance.visible = false
health_bar_instance.visible = false
visible = false visible = false
$player_collider.disabled = true $player_collider.disabled = true
$hitbox/CollisionShape2D.disabled = true $hitbox/CollisionShape2D.disabled = true

View File

@ -69,6 +69,15 @@ func _server_disconnected() -> void:
prompt.set_text("Disconnected from server") prompt.set_text("Disconnected from server")
func _server_leave() -> void:
print("Left the server")
for child in PersistentNodes.get_children():
if child.is_in_group("Net"):
child.queue_free()
reset_network_connection()
func _client_connection_timeout(): func _client_connection_timeout():
if client_connected_to_server == false: if client_connected_to_server == false:
print("Client has been timed out") print("Client has been timed out")

View File

@ -15,6 +15,7 @@ onready var device_ip_address = $UI/device_ip_address
onready var start_game = $UI/start_game onready var start_game = $UI/start_game
onready var background_lobby = $background_lobby onready var background_lobby = $background_lobby
onready var text = $UI/text onready var text = $UI/text
onready var menu_botton = $UI/menu_button
func _ready() -> void: func _ready() -> void:
@ -22,6 +23,7 @@ func _ready() -> void:
background_lobby.hide() background_lobby.hide()
device_ip_address.hide() device_ip_address.hide()
text.hide() text.hide()
menu_botton.hide()
get_tree().connect("network_peer_connected", self, "_player_connected") get_tree().connect("network_peer_connected", self, "_player_connected")
@ -70,6 +72,7 @@ func _player_disconnected(id) -> void:
if PersistentNodes.has_node(str(id)): if PersistentNodes.has_node(str(id)):
PersistentNodes.get_node(str(id)).username_text_instance.queue_free() PersistentNodes.get_node(str(id)).username_text_instance.queue_free()
PersistentNodes.get_node(str(id)).health_bar_instance.queue_free()
PersistentNodes.get_node(str(id)).queue_free() PersistentNodes.get_node(str(id)).queue_free()
@ -89,9 +92,7 @@ func _on_join_server_pressed():
func _connected_to_server() -> void: func _connected_to_server() -> void:
yield(get_tree().create_timer(0.1), "timeout") yield(get_tree().create_timer(0.1), "timeout")
device_ip_address.show() show_lobby()
background_lobby.show()
text.show()
instance_player(get_tree().get_network_unique_id()) instance_player(get_tree().get_network_unique_id())
@ -119,18 +120,22 @@ func _on_confirm_pressed():
if mode == "create": if mode == "create":
if username_text_edit.text != "": if username_text_edit.text != "":
Network.current_player_username = username_text_edit.text Network.current_player_username = username_text_edit.text
multiplayer_config_ui.hide() show_lobby()
device_ip_address.show()
background_lobby.show()
text.show()
Network.create_server() Network.create_server()
instance_player(get_tree().get_network_unique_id()) instance_player(get_tree().get_network_unique_id())
elif mode == "join": elif mode == "join":
if username_text_edit.text != "": if username_text_edit.text != "":
multiplayer_config_ui.hide()
Global.instance_node(load("res://source/scenes/GUI/server_handlers/server_browser.tscn"), self) Global.instance_node(load("res://source/scenes/GUI/server_handlers/server_browser.tscn"), self)
func show_lobby():
multiplayer_config_ui.hide()
device_ip_address.show()
background_lobby.show()
text.show()
menu_botton.show()
func _on_return_pressed(): func _on_return_pressed():
get_tree().change_scene("res://source/scenes/GUI/main_menu.tscn") get_tree().change_scene("res://source/scenes/GUI/main_menu.tscn")

View File

@ -24,7 +24,7 @@ func _on_confirm_pressed():
func instance_player(id) -> void: func instance_player(id) -> void:
var player_instance = Global.instance_node_at_location(player, PersistentNodes, Vector2(960, 540)) var player_instance = Global.instance_node_at_location(player, PersistentNodes, Vector2())
player_instance.name = str(id) player_instance.name = str(id)
player_instance.set_network_master(id) player_instance.set_network_master(id)
player_instance.username = username_text_edit.text player_instance.username = username_text_edit.text

View File

@ -25,6 +25,7 @@ func setup_player_positions() -> void:
func _player_disconnected(id) -> void: func _player_disconnected(id) -> void:
if PersistentNodes.has_node(str(id)): if PersistentNodes.has_node(str(id)):
PersistentNodes.get_node(str(id)).username_text_instance.queue_free() PersistentNodes.get_node(str(id)).username_text_instance.queue_free()
PersistentNodes.get_node(str(id)).health_bar_instance.queue_free()
PersistentNodes.get_node(str(id)).queue_free() PersistentNodes.get_node(str(id)).queue_free()

View File

@ -27,6 +27,4 @@ func _process(delta):
func _on_hitbox_body_entered(body): func _on_hitbox_body_entered(body):
if body.is_in_group("mobs"):
body.queue_free()
queue_free() queue_free()

View File

@ -21,6 +21,4 @@ func _process(delta):
func _on_hitbox_body_entered(body): func _on_hitbox_body_entered(body):
if body.is_in_group("mobs"):
body.queue_free()
queue_free() queue_free()

View File

@ -30,6 +30,4 @@ func _process(delta):
func _on_hitbox_body_entered(body): func _on_hitbox_body_entered(body):
if body.is_in_group("mobs"):
body.queue_free()
queue_free() queue_free()

View File

@ -0,0 +1,18 @@
extends Node2D
var player_following = null
var value = "" setget value_set
var distanceToPlayerOffset = -150
onready var health_bar = $health_bar
func _process(delta: float) -> void:
if player_following != null:
global_position = player_following.global_position + Vector2(0,distanceToPlayerOffset).rotated(player_following.rotation)
func value_set(new_text) -> void:
value = new_text
health_bar.value = value

View File

@ -3,8 +3,8 @@ extends CanvasLayer
# if 0, then singleplayer will work, if 1, then multiplayer only # if 0, then singleplayer will work, if 1, then multiplayer only
var winner_amount = 1 var winner_amount = 1
onready var win_timer = $Control/winner/win_timer onready var win_timer = $winner/win_timer
onready var winner = $Control/winner onready var winner = $winner
func _ready() -> void: func _ready() -> void:
winner.hide() winner.hide()

View File

@ -2,7 +2,7 @@ extends Control
func _on_play_pressed(): func _on_play_pressed():
get_tree().change_scene("res://source/scenes/GUI/sinplayer_setup.tscn") get_tree().change_scene("res://source/scenes/GUI/singleplayer_setup.tscn")
func _on_LAN_party_pressed(): func _on_LAN_party_pressed():
@ -11,3 +11,5 @@ func _on_LAN_party_pressed():
func _on_exit_pressed(): func _on_exit_pressed():
get_tree().quit() get_tree().quit()

View File

@ -0,0 +1,8 @@
extends TextureButton
#func _process(delta) -> void:
# if Input.is_action_just_pressed("esc"):
# Global.instance_node(load("res://source/scenes/OVERLAY/elements/menu_button_overlay.tscn"), Global.ui)
func _on_menu_button_pressed():
Global.instance_node(load("res://source/scenes/OVERLAY/elements/menu_button_overlay.tscn"), Global.ui)

View File

@ -0,0 +1,20 @@
extends Control
func _process(delta) -> void:
# print(str(self))
if Input.is_action_just_pressed("esc"):
hide()
func _on_return_to_game_pressed():
hide()
func _on_return_to_main_menu_pressed():
Network._server_leave()
get_tree().change_scene("res://source/scenes/GUI/main_menu.tscn")
func _on_exit_game_pressed():
get_tree().quit()

Binary file not shown.

After

Width:  |  Height:  |  Size: 989 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 984 B

View File

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="50"
height="50"
viewBox="0 0 13.229166 13.229167"
version="1.1"
id="svg5"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
sodipodi:docname="menu_button.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:pageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:document-units="mm"
showgrid="false"
units="px"
width="500px"
inkscape:zoom="8.979798"
inkscape:cx="17.093926"
inkscape:cy="22.105174"
inkscape:window-width="1920"
inkscape:window-height="1007"
inkscape:window-x="1920"
inkscape:window-y="44"
inkscape:window-maximized="1"
inkscape:current-layer="g3016" />
<defs
id="defs2" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="g3016"
transform="matrix(0.12499999,0,0,0.125,-1.653645,-1.653646)">
<g
id="g3482">
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect3208"
width="105.83334"
height="21.166666"
x="13.229161"
y="55.5625"
rx="2.1166668"
ry="2.1166668" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect3450"
width="105.83334"
height="21.166666"
x="13.22916"
y="13.229168"
rx="2.1166668"
ry="2.1166668" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect3452"
width="105.83334"
height="21.166666"
x="13.22916"
y="97.895836"
rx="2.1166668"
ry="2.1166668" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect3470"
width="105.83334"
height="21.166666"
x="13.229161"
y="55.5625"
rx="2.1166668"
ry="2.1166668" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect3472"
width="105.83334"
height="21.166666"
x="13.22916"
y="13.229168"
rx="2.1166668"
ry="2.1166668" />
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect3474"
width="105.83334"
height="21.166666"
x="13.22916"
y="97.895836"
rx="2.1166668"
ry="2.1166668" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -0,0 +1,161 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="50"
height="50"
viewBox="0 0 13.229166 13.229167"
version="1.1"
id="svg3513"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
sodipodi:docname="menu_button_hover.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview3515"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:pageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:document-units="mm"
showgrid="false"
units="px"
inkscape:zoom="4.489899"
inkscape:cx="-19.710911"
inkscape:cy="15.47919"
inkscape:window-width="1920"
inkscape:window-height="1007"
inkscape:window-x="1920"
inkscape:window-y="44"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs3510" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="g3482"
transform="matrix(0.12499999,0,0,0.125,-1.6536449,-1.653646)"
style="fill:#b3b3b3;fill-opacity:1">
<rect
style="opacity:1;fill:#b3b3b3;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect3208"
width="105.83334"
height="21.166666"
x="13.229161"
y="55.5625"
rx="2.1166668"
ry="2.1166668" />
<rect
style="opacity:1;fill:#b3b3b3;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect3450"
width="105.83334"
height="21.166666"
x="13.22916"
y="13.229168"
rx="2.1166668"
ry="2.1166668" />
<rect
style="opacity:1;fill:#b3b3b3;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect3452"
width="105.83334"
height="21.166666"
x="13.22916"
y="97.895836"
rx="2.1166668"
ry="2.1166668" />
<rect
style="opacity:1;fill:#b3b3b3;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect3470"
width="105.83334"
height="21.166666"
x="13.229161"
y="55.5625"
rx="2.1166668"
ry="2.1166668" />
<rect
style="opacity:1;fill:#b3b3b3;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect3472"
width="105.83334"
height="21.166666"
x="13.22916"
y="13.229168"
rx="2.1166668"
ry="2.1166668" />
<rect
style="opacity:1;fill:#b3b3b3;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect3474"
width="105.83334"
height="21.166666"
x="13.22916"
y="97.895836"
rx="2.1166668"
ry="2.1166668" />
</g>
<g
id="g19319"
transform="matrix(0.12499999,0,0,0.125,-1.6536449,-1.653646)"
style="fill:#b3b3b3;fill-opacity:1">
<rect
style="opacity:1;fill:#b3b3b3;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect19307"
width="105.83334"
height="21.166666"
x="13.229161"
y="55.5625"
rx="2.1166668"
ry="2.1166668" />
<rect
style="opacity:1;fill:#b3b3b3;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect19309"
width="105.83334"
height="21.166666"
x="13.22916"
y="13.229168"
rx="2.1166668"
ry="2.1166668" />
<rect
style="opacity:1;fill:#b3b3b3;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect19311"
width="105.83334"
height="21.166666"
x="13.22916"
y="97.895836"
rx="2.1166668"
ry="2.1166668" />
<rect
style="opacity:1;fill:#b3b3b3;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect19313"
width="105.83334"
height="21.166666"
x="13.229161"
y="55.5625"
rx="2.1166668"
ry="2.1166668" />
<rect
style="opacity:1;fill:#b3b3b3;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect19315"
width="105.83334"
height="21.166666"
x="13.22916"
y="13.229168"
rx="2.1166668"
ry="2.1166668" />
<rect
style="opacity:1;fill:#b3b3b3;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect19317"
width="105.83334"
height="21.166666"
x="13.22916"
y="97.895836"
rx="2.1166668"
ry="2.1166668" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -0,0 +1,161 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="50"
height="50"
viewBox="0 0 13.229166 13.229167"
version="1.1"
id="svg3513"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
sodipodi:docname="menu_button_pressed.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview3515"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:pageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:document-units="mm"
showgrid="false"
units="px"
inkscape:zoom="4.489899"
inkscape:cx="-16.147357"
inkscape:cy="13.920135"
inkscape:window-width="1920"
inkscape:window-height="1007"
inkscape:window-x="1920"
inkscape:window-y="44"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs3510" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="g3482"
transform="matrix(0.12499999,0,0,0.125,-1.6536449,-1.653646)"
style="fill:#b3b3b3;fill-opacity:1">
<rect
style="opacity:1;fill:#b3b3b3;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect3208"
width="105.83334"
height="21.166666"
x="13.229161"
y="55.5625"
rx="2.1166668"
ry="2.1166668" />
<rect
style="opacity:1;fill:#b3b3b3;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect3450"
width="105.83334"
height="21.166666"
x="13.22916"
y="13.229168"
rx="2.1166668"
ry="2.1166668" />
<rect
style="opacity:1;fill:#b3b3b3;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect3452"
width="105.83334"
height="21.166666"
x="13.22916"
y="97.895836"
rx="2.1166668"
ry="2.1166668" />
<rect
style="opacity:1;fill:#b3b3b3;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect3470"
width="105.83334"
height="21.166666"
x="13.229161"
y="55.5625"
rx="2.1166668"
ry="2.1166668" />
<rect
style="opacity:1;fill:#b3b3b3;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect3472"
width="105.83334"
height="21.166666"
x="13.22916"
y="13.229168"
rx="2.1166668"
ry="2.1166668" />
<rect
style="opacity:1;fill:#b3b3b3;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect3474"
width="105.83334"
height="21.166666"
x="13.22916"
y="97.895836"
rx="2.1166668"
ry="2.1166668" />
</g>
<g
id="g19319"
transform="matrix(0.12499999,0,0,0.125,-1.6536449,-1.653646)"
style="fill:#999999;fill-opacity:1">
<rect
style="opacity:1;fill:#999999;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect19307"
width="105.83334"
height="21.166666"
x="13.229161"
y="55.5625"
rx="2.1166668"
ry="2.1166668" />
<rect
style="opacity:1;fill:#999999;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect19309"
width="105.83334"
height="21.166666"
x="13.22916"
y="13.229168"
rx="2.1166668"
ry="2.1166668" />
<rect
style="opacity:1;fill:#999999;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect19311"
width="105.83334"
height="21.166666"
x="13.22916"
y="97.895836"
rx="2.1166668"
ry="2.1166668" />
<rect
style="opacity:1;fill:#999999;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect19313"
width="105.83334"
height="21.166666"
x="13.229161"
y="55.5625"
rx="2.1166668"
ry="2.1166668" />
<rect
style="opacity:1;fill:#999999;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect19315"
width="105.83334"
height="21.166666"
x="13.22916"
y="13.229168"
rx="2.1166668"
ry="2.1166668" />
<rect
style="opacity:1;fill:#999999;fill-opacity:1;stroke:none;stroke-width:9.85695;stroke-opacity:1"
id="rect19317"
width="105.83334"
height="21.166666"
x="13.22916"
y="97.895836"
rx="2.1166668"
ry="2.1166668" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -173,10 +173,15 @@
[sub_resource type="SpriteFrames" id=2] [sub_resource type="SpriteFrames" id=2]
animations = [ { animations = [ {
"frames": [ ExtResource( 5 ), ExtResource( 42 ), ExtResource( 35 ), ExtResource( 24 ), ExtResource( 8 ), ExtResource( 31 ), ExtResource( 30 ), ExtResource( 38 ), ExtResource( 10 ), ExtResource( 43 ), ExtResource( 41 ), ExtResource( 33 ), ExtResource( 44 ), ExtResource( 19 ), ExtResource( 29 ), ExtResource( 25 ), ExtResource( 36 ), ExtResource( 12 ), ExtResource( 45 ), ExtResource( 21 ) ], "frames": [ ExtResource( 70 ), ExtResource( 49 ), ExtResource( 74 ), ExtResource( 75 ), ExtResource( 28 ), ExtResource( 52 ), ExtResource( 53 ), ExtResource( 55 ), ExtResource( 150 ), ExtResource( 156 ), ExtResource( 138 ), ExtResource( 161 ), ExtResource( 145 ), ExtResource( 148 ), ExtResource( 147 ), ExtResource( 133 ), ExtResource( 164 ), ExtResource( 134 ), ExtResource( 152 ), ExtResource( 160 ) ],
"loop": true, "loop": true,
"name": "boost-speed-right-01", "name": "move-speed-left-03",
"speed": 50.0 "speed": 35.0
}, {
"frames": [ ExtResource( 167 ), ExtResource( 157 ), ExtResource( 158 ), ExtResource( 126 ), ExtResource( 90 ), ExtResource( 89 ), ExtResource( 97 ), ExtResource( 88 ), ExtResource( 98 ), ExtResource( 91 ), ExtResource( 125 ), ExtResource( 105 ), ExtResource( 82 ), ExtResource( 84 ), ExtResource( 92 ), ExtResource( 103 ), ExtResource( 122 ), ExtResource( 130 ), ExtResource( 104 ), ExtResource( 116 ) ],
"loop": true,
"name": "move-speed-right-02",
"speed": 35.0
}, { }, {
"frames": [ ExtResource( 5 ), ExtResource( 42 ), ExtResource( 35 ), ExtResource( 24 ), ExtResource( 8 ), ExtResource( 31 ), ExtResource( 30 ), ExtResource( 38 ), ExtResource( 10 ), ExtResource( 43 ), ExtResource( 41 ), ExtResource( 33 ), ExtResource( 44 ), ExtResource( 19 ), ExtResource( 29 ), ExtResource( 25 ), ExtResource( 36 ), ExtResource( 12 ), ExtResource( 45 ), ExtResource( 21 ) ], "frames": [ ExtResource( 5 ), ExtResource( 42 ), ExtResource( 35 ), ExtResource( 24 ), ExtResource( 8 ), ExtResource( 31 ), ExtResource( 30 ), ExtResource( 38 ), ExtResource( 10 ), ExtResource( 43 ), ExtResource( 41 ), ExtResource( 33 ), ExtResource( 44 ), ExtResource( 19 ), ExtResource( 29 ), ExtResource( 25 ), ExtResource( 36 ), ExtResource( 12 ), ExtResource( 45 ), ExtResource( 21 ) ],
"loop": true, "loop": true,
@ -188,21 +193,6 @@ animations = [ {
"name": "move-speed-right-04", "name": "move-speed-right-04",
"speed": 35.0 "speed": 35.0
}, { }, {
"frames": [ ExtResource( 162 ), ExtResource( 135 ), ExtResource( 146 ), ExtResource( 141 ), ExtResource( 143 ), ExtResource( 163 ), ExtResource( 149 ), ExtResource( 136 ), ExtResource( 154 ), ExtResource( 137 ), ExtResource( 165 ), ExtResource( 142 ), ExtResource( 139 ), ExtResource( 159 ), ExtResource( 140 ), ExtResource( 155 ), ExtResource( 144 ), ExtResource( 151 ), ExtResource( 153 ), ExtResource( 166 ) ],
"loop": true,
"name": "boost-speed-left-04",
"speed": 50.0
}, {
"frames": [ ExtResource( 5 ), ExtResource( 42 ), ExtResource( 35 ), ExtResource( 24 ), ExtResource( 8 ), ExtResource( 31 ), ExtResource( 30 ), ExtResource( 38 ), ExtResource( 10 ), ExtResource( 43 ), ExtResource( 41 ), ExtResource( 33 ), ExtResource( 44 ), ExtResource( 19 ), ExtResource( 29 ), ExtResource( 25 ), ExtResource( 36 ), ExtResource( 12 ), ExtResource( 45 ), ExtResource( 21 ) ],
"loop": true,
"name": "idle-speed-right-02",
"speed": 25.0
}, {
"frames": [ ExtResource( 99 ), ExtResource( 83 ), ExtResource( 109 ), ExtResource( 111 ), ExtResource( 101 ), ExtResource( 96 ), ExtResource( 79 ), ExtResource( 132 ), ExtResource( 119 ), ExtResource( 80 ), ExtResource( 85 ), ExtResource( 86 ), ExtResource( 87 ), ExtResource( 106 ), ExtResource( 121 ), ExtResource( 129 ), ExtResource( 100 ), ExtResource( 108 ), ExtResource( 110 ), ExtResource( 120 ) ],
"loop": true,
"name": "boost-speed-right-04",
"speed": 50.0
}, {
"frames": [ ExtResource( 114 ), ExtResource( 128 ), ExtResource( 93 ), ExtResource( 107 ), ExtResource( 117 ), ExtResource( 102 ), ExtResource( 81 ), ExtResource( 118 ), ExtResource( 76 ), ExtResource( 115 ), ExtResource( 127 ), ExtResource( 123 ), ExtResource( 113 ), ExtResource( 77 ), ExtResource( 78 ), ExtResource( 124 ), ExtResource( 94 ), ExtResource( 112 ), ExtResource( 131 ), ExtResource( 95 ) ], "frames": [ ExtResource( 114 ), ExtResource( 128 ), ExtResource( 93 ), ExtResource( 107 ), ExtResource( 117 ), ExtResource( 102 ), ExtResource( 81 ), ExtResource( 118 ), ExtResource( 76 ), ExtResource( 115 ), ExtResource( 127 ), ExtResource( 123 ), ExtResource( 113 ), ExtResource( 77 ), ExtResource( 78 ), ExtResource( 124 ), ExtResource( 94 ), ExtResource( 112 ), ExtResource( 131 ), ExtResource( 95 ) ],
"loop": true, "loop": true,
"name": "move-speed-right-03", "name": "move-speed-right-03",
@ -233,15 +223,40 @@ animations = [ {
"name": "idle-speed-left-01", "name": "idle-speed-left-01",
"speed": 25.0 "speed": 25.0
}, { }, {
"frames": [ ExtResource( 70 ), ExtResource( 49 ), ExtResource( 74 ), ExtResource( 75 ), ExtResource( 28 ), ExtResource( 52 ), ExtResource( 53 ), ExtResource( 55 ), ExtResource( 150 ), ExtResource( 156 ), ExtResource( 138 ), ExtResource( 161 ), ExtResource( 145 ), ExtResource( 148 ), ExtResource( 147 ), ExtResource( 133 ), ExtResource( 164 ), ExtResource( 134 ), ExtResource( 152 ), ExtResource( 160 ) ], "frames": [ ExtResource( 48 ), ExtResource( 4 ), ExtResource( 3 ), ExtResource( 46 ), ExtResource( 47 ), ExtResource( 32 ), ExtResource( 13 ), ExtResource( 40 ), ExtResource( 6 ), ExtResource( 15 ), ExtResource( 22 ), ExtResource( 14 ), ExtResource( 9 ), ExtResource( 37 ), ExtResource( 23 ), ExtResource( 39 ), ExtResource( 20 ), ExtResource( 18 ), ExtResource( 7 ), ExtResource( 34 ) ],
"loop": true, "loop": true,
"name": "move-speed-left-03", "name": "boost-speed-left-01",
"speed": 50.0
}, {
"frames": [ ExtResource( 162 ), ExtResource( 135 ), ExtResource( 146 ), ExtResource( 141 ), ExtResource( 143 ), ExtResource( 163 ), ExtResource( 149 ), ExtResource( 136 ), ExtResource( 154 ), ExtResource( 137 ), ExtResource( 165 ), ExtResource( 142 ), ExtResource( 139 ), ExtResource( 159 ), ExtResource( 140 ), ExtResource( 155 ), ExtResource( 144 ), ExtResource( 151 ), ExtResource( 153 ), ExtResource( 166 ) ],
"loop": true,
"name": "boost-speed-left-04",
"speed": 50.0
}, {
"frames": [ ExtResource( 5 ), ExtResource( 42 ), ExtResource( 35 ), ExtResource( 24 ), ExtResource( 8 ), ExtResource( 31 ), ExtResource( 30 ), ExtResource( 38 ), ExtResource( 10 ), ExtResource( 43 ), ExtResource( 41 ), ExtResource( 33 ), ExtResource( 44 ), ExtResource( 19 ), ExtResource( 29 ), ExtResource( 25 ), ExtResource( 36 ), ExtResource( 12 ), ExtResource( 45 ), ExtResource( 21 ) ],
"loop": true,
"name": "idle-speed-right-02",
"speed": 25.0
}, {
"frames": [ ExtResource( 99 ), ExtResource( 83 ), ExtResource( 109 ), ExtResource( 111 ), ExtResource( 101 ), ExtResource( 96 ), ExtResource( 79 ), ExtResource( 132 ), ExtResource( 119 ), ExtResource( 80 ), ExtResource( 85 ), ExtResource( 86 ), ExtResource( 87 ), ExtResource( 106 ), ExtResource( 121 ), ExtResource( 129 ), ExtResource( 100 ), ExtResource( 108 ), ExtResource( 110 ), ExtResource( 120 ) ],
"loop": true,
"name": "boost-speed-right-04",
"speed": 50.0
}, {
"frames": [ ExtResource( 5 ), ExtResource( 42 ), ExtResource( 35 ), ExtResource( 24 ), ExtResource( 8 ), ExtResource( 31 ), ExtResource( 30 ), ExtResource( 38 ), ExtResource( 10 ), ExtResource( 43 ), ExtResource( 41 ), ExtResource( 33 ), ExtResource( 44 ), ExtResource( 19 ), ExtResource( 29 ), ExtResource( 25 ), ExtResource( 36 ), ExtResource( 12 ), ExtResource( 45 ), ExtResource( 21 ) ],
"loop": true,
"name": "boost-speed-right-01",
"speed": 50.0
}, {
"frames": [ ExtResource( 48 ), ExtResource( 4 ), ExtResource( 3 ), ExtResource( 46 ), ExtResource( 47 ), ExtResource( 32 ), ExtResource( 13 ), ExtResource( 40 ), ExtResource( 6 ), ExtResource( 15 ), ExtResource( 22 ), ExtResource( 14 ), ExtResource( 9 ), ExtResource( 37 ), ExtResource( 23 ), ExtResource( 39 ), ExtResource( 20 ), ExtResource( 18 ), ExtResource( 7 ), ExtResource( 34 ) ],
"loop": true,
"name": "move-speed-left-01",
"speed": 35.0 "speed": 35.0
}, { }, {
"frames": [ ExtResource( 167 ), ExtResource( 157 ), ExtResource( 158 ), ExtResource( 126 ), ExtResource( 90 ), ExtResource( 89 ), ExtResource( 97 ), ExtResource( 88 ), ExtResource( 98 ), ExtResource( 91 ), ExtResource( 125 ), ExtResource( 105 ), ExtResource( 82 ), ExtResource( 84 ), ExtResource( 92 ), ExtResource( 103 ), ExtResource( 122 ), ExtResource( 130 ), ExtResource( 104 ), ExtResource( 116 ) ], "frames": [ ExtResource( 114 ), ExtResource( 128 ), ExtResource( 93 ), ExtResource( 107 ), ExtResource( 117 ), ExtResource( 102 ), ExtResource( 81 ), ExtResource( 118 ), ExtResource( 76 ), ExtResource( 115 ), ExtResource( 127 ), ExtResource( 123 ), ExtResource( 113 ), ExtResource( 77 ), ExtResource( 78 ), ExtResource( 124 ), ExtResource( 94 ), ExtResource( 112 ), ExtResource( 131 ), ExtResource( 95 ) ],
"loop": true, "loop": true,
"name": "move-speed-right-02", "name": "boost-speed-right-03",
"speed": 35.0 "speed": 50.0
}, { }, {
"frames": [ ExtResource( 70 ), ExtResource( 49 ), ExtResource( 74 ), ExtResource( 75 ), ExtResource( 28 ), ExtResource( 52 ), ExtResource( 53 ), ExtResource( 55 ), ExtResource( 150 ), ExtResource( 156 ), ExtResource( 138 ), ExtResource( 161 ), ExtResource( 145 ), ExtResource( 148 ), ExtResource( 147 ), ExtResource( 133 ), ExtResource( 164 ), ExtResource( 134 ), ExtResource( 152 ), ExtResource( 160 ) ], "frames": [ ExtResource( 70 ), ExtResource( 49 ), ExtResource( 74 ), ExtResource( 75 ), ExtResource( 28 ), ExtResource( 52 ), ExtResource( 53 ), ExtResource( 55 ), ExtResource( 150 ), ExtResource( 156 ), ExtResource( 138 ), ExtResource( 161 ), ExtResource( 145 ), ExtResource( 148 ), ExtResource( 147 ), ExtResource( 133 ), ExtResource( 164 ), ExtResource( 134 ), ExtResource( 152 ), ExtResource( 160 ) ],
"loop": true, "loop": true,
@ -252,21 +267,6 @@ animations = [ {
"loop": true, "loop": true,
"name": "boost-speed-right-02", "name": "boost-speed-right-02",
"speed": 50.0 "speed": 50.0
}, {
"frames": [ ExtResource( 48 ), ExtResource( 4 ), ExtResource( 3 ), ExtResource( 46 ), ExtResource( 47 ), ExtResource( 32 ), ExtResource( 13 ), ExtResource( 40 ), ExtResource( 6 ), ExtResource( 15 ), ExtResource( 22 ), ExtResource( 14 ), ExtResource( 9 ), ExtResource( 37 ), ExtResource( 23 ), ExtResource( 39 ), ExtResource( 20 ), ExtResource( 18 ), ExtResource( 7 ), ExtResource( 34 ) ],
"loop": true,
"name": "move-speed-left-01",
"speed": 35.0
}, {
"frames": [ ExtResource( 48 ), ExtResource( 4 ), ExtResource( 3 ), ExtResource( 46 ), ExtResource( 47 ), ExtResource( 32 ), ExtResource( 13 ), ExtResource( 40 ), ExtResource( 6 ), ExtResource( 15 ), ExtResource( 22 ), ExtResource( 14 ), ExtResource( 9 ), ExtResource( 37 ), ExtResource( 23 ), ExtResource( 39 ), ExtResource( 20 ), ExtResource( 18 ), ExtResource( 7 ), ExtResource( 34 ) ],
"loop": true,
"name": "boost-speed-left-01",
"speed": 50.0
}, {
"frames": [ ExtResource( 114 ), ExtResource( 128 ), ExtResource( 93 ), ExtResource( 107 ), ExtResource( 117 ), ExtResource( 102 ), ExtResource( 81 ), ExtResource( 118 ), ExtResource( 76 ), ExtResource( 115 ), ExtResource( 127 ), ExtResource( 123 ), ExtResource( 113 ), ExtResource( 77 ), ExtResource( 78 ), ExtResource( 124 ), ExtResource( 94 ), ExtResource( 112 ), ExtResource( 131 ), ExtResource( 95 ) ],
"loop": true,
"name": "boost-speed-right-03",
"speed": 50.0
} ] } ]
[sub_resource type="RectangleShape2D" id=3] [sub_resource type="RectangleShape2D" id=3]
@ -299,7 +299,7 @@ radius = 41.5403
animations = [ { animations = [ {
"frames": [ ExtResource( 170 ) ], "frames": [ ExtResource( 170 ) ],
"loop": true, "loop": true,
"name": "03", "name": "02",
"speed": 5.0 "speed": 5.0
}, { }, {
"frames": [ ExtResource( 27 ) ], "frames": [ ExtResource( 27 ) ],
@ -307,15 +307,15 @@ animations = [ {
"name": "01", "name": "01",
"speed": 5.0 "speed": 5.0
}, { }, {
"frames": [ ExtResource( 170 ) ],
"loop": true,
"name": "03",
"speed": 5.0
}, {
"frames": [ ExtResource( 169 ) ], "frames": [ ExtResource( 169 ) ],
"loop": true, "loop": true,
"name": "04", "name": "04",
"speed": 5.0 "speed": 5.0
}, {
"frames": [ ExtResource( 170 ) ],
"loop": true,
"name": "02",
"speed": 5.0
} ] } ]
[node name="player" type="KinematicBody2D" groups=[ [node name="player" type="KinematicBody2D" groups=[

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=15 format=2] [gd_scene load_steps=16 format=2]
[ext_resource path="res://source/assets/scripts/server_handlers/trinity_site_level.gd" type="Script" id=1] [ext_resource path="res://source/assets/scripts/server_handlers/trinity_site_level.gd" type="Script" id=1]
[ext_resource path="res://source/assets/scripts/ui_element_handlers/UI.gd" type="Script" id=2] [ext_resource path="res://source/assets/scripts/ui_element_handlers/UI.gd" type="Script" id=2]
@ -12,6 +12,7 @@
[ext_resource path="res://source/levels/trinity_site/images/trinity_site_level_layout_level_design_z_index_2.svg" type="Texture" id=10] [ext_resource path="res://source/levels/trinity_site/images/trinity_site_level_layout_level_design_z_index_2.svg" type="Texture" id=10]
[ext_resource path="res://source/levels/trinity_site/images/trinity_site_level_layout_level_design_z_index_1.svg" type="Texture" id=11] [ext_resource path="res://source/levels/trinity_site/images/trinity_site_level_layout_level_design_z_index_1.svg" type="Texture" id=11]
[ext_resource path="res://source/fonts/oxygen/oxygen_bold.tres" type="DynamicFont" id=12] [ext_resource path="res://source/fonts/oxygen/oxygen_bold.tres" type="DynamicFont" id=12]
[ext_resource path="res://source/scenes/OVERLAY/elements/menu_button.tscn" type="PackedScene" id=13]
[ext_resource path="res://source/assets/scripts/trinity_site_body_handler.gd" type="Script" id=46] [ext_resource path="res://source/assets/scripts/trinity_site_body_handler.gd" type="Script" id=46]
[sub_resource type="DynamicFont" id=1] [sub_resource type="DynamicFont" id=1]
@ -149,16 +150,7 @@ script = ExtResource( 2 )
[node name="game_UI" type="CanvasLayer" parent="."] [node name="game_UI" type="CanvasLayer" parent="."]
script = ExtResource( 6 ) script = ExtResource( 6 )
[node name="Control" type="Control" parent="game_UI"] [node name="winner" type="Label" parent="game_UI"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 10 )
__meta__ = {
"_edit_lock_": true,
"_edit_use_anchors_": false
}
[node name="winner" type="Label" parent="game_UI/Control"]
anchor_top = 0.5 anchor_top = 0.5
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 0.5 anchor_bottom = 0.5
@ -179,61 +171,9 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="win_timer" type="Timer" parent="game_UI/Control/winner"] [node name="win_timer" type="Timer" parent="game_UI/winner"]
wait_time = 4.0 wait_time = 4.0
[node name="Line" type="Button" parent="game_UI/Control"]
anchor_left = 0.018
anchor_top = 0.875
anchor_right = 0.06
anchor_bottom = 0.95
margin_left = 0.439999
margin_top = -6.10352e-05
margin_right = -0.200005
text = "Line"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Sine" type="Button" parent="game_UI/Control"]
anchor_left = 0.018
anchor_top = 0.875
anchor_right = 0.06
anchor_bottom = 0.95
margin_left = 118.44
margin_top = -6.10352e-05
margin_right = 117.8
text = "Sine"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Parab" type="Button" parent="game_UI/Control"]
anchor_left = 0.018
anchor_top = 0.875
anchor_right = 0.06
anchor_bottom = 0.95
margin_left = 233.44
margin_top = -6.10352e-05
margin_right = 232.8
text = "Parabola"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Hyper" type="Button" parent="game_UI/Control"]
anchor_left = 0.018
anchor_top = 0.875
anchor_right = 0.06
anchor_bottom = 0.95
margin_left = 348.44
margin_top = -6.10352e-05
margin_right = 347.8
text = "Hyperbola"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="timer" type="Label" parent="."] [node name="timer" type="Label" parent="."]
margin_right = 589.0 margin_right = 589.0
margin_bottom = 175.0 margin_bottom = 175.0
@ -245,6 +185,76 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[connection signal="timeout" from="game_UI/Control/winner/win_timer" to="game_UI/Control/winner" method="_on_win_timer_timeout"] [node name="controls" type="Control" parent="."]
[connection signal="pressed" from="game_UI/Control/Line" to="game_UI/Control" method="_on_Line_pressed"] margin_right = 1920.0
[connection signal="pressed" from="game_UI/Control/Sine" to="game_UI/Control" method="_on_Sine_pressed"] margin_bottom = 1080.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="menu_button" parent="controls" instance=ExtResource( 13 )]
anchor_left = 1.0
anchor_right = 1.0
margin_left = -70.0
margin_top = 20.0
margin_right = -20.0
margin_bottom = 70.0
focus_mode = 0
[node name="Line" type="Button" parent="controls"]
anchor_left = 0.018
anchor_top = 0.875
anchor_right = 0.06
anchor_bottom = 0.95
margin_left = 8.82419
margin_top = -6.4104
margin_right = 47.8242
margin_bottom = 13.5896
text = "Line"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Sine" type="Button" parent="controls"]
anchor_left = 0.018
anchor_top = 0.875
anchor_right = 0.06
anchor_bottom = 0.95
margin_left = 126.824
margin_top = -6.4104
margin_right = 165.824
margin_bottom = 13.5896
text = "Sine"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Parab" type="Button" parent="controls"]
anchor_left = 0.018
anchor_top = 0.875
anchor_right = 0.06
anchor_bottom = 0.95
margin_left = 241.824
margin_top = -6.4104
margin_right = 307.824
margin_bottom = 13.5896
text = "Parabola"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Hyper" type="Button" parent="controls"]
anchor_left = 0.018
anchor_top = 0.875
anchor_right = 0.06
anchor_bottom = 0.95
margin_left = 356.824
margin_top = -6.4104
margin_right = 433.824
margin_bottom = 13.5896
text = "Hyperbola"
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="timeout" from="game_UI/winner/win_timer" to="game_UI/winner" method="_on_win_timer_timeout"]

View File

@ -50,8 +50,8 @@ margin_left = -150.0
margin_top = -36.0 margin_top = -36.0
margin_right = 150.0 margin_right = 150.0
margin_bottom = 36.0 margin_bottom = 36.0
custom_colors/font_color = Color( 0, 0, 0, 1 )
custom_fonts/font = ExtResource( 5 ) custom_fonts/font = ExtResource( 5 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "PLAY" text = "PLAY"
align = 1 align = 1
valign = 1 valign = 1
@ -75,8 +75,8 @@ margin_left = -98.8223
margin_top = -36.0 margin_top = -36.0
margin_right = 134.178 margin_right = 134.178
margin_bottom = 36.0 margin_bottom = 36.0
custom_colors/font_color = Color( 0, 0, 0, 1 )
custom_fonts/font = ExtResource( 5 ) custom_fonts/font = ExtResource( 5 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "LAN Party" text = "LAN Party"
align = 1 align = 1
valign = 1 valign = 1
@ -107,8 +107,8 @@ margin_left = -150.0
margin_top = -36.0 margin_top = -36.0
margin_right = 150.0 margin_right = 150.0
margin_bottom = 36.0 margin_bottom = 36.0
custom_colors/font_color = Color( 0, 0, 0, 1 )
custom_fonts/font = ExtResource( 5 ) custom_fonts/font = ExtResource( 5 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "EXIT" text = "EXIT"
align = 1 align = 1
valign = 1 valign = 1

View File

@ -1,8 +1,9 @@
[gd_scene load_steps=21 format=2] [gd_scene load_steps=22 format=2]
[ext_resource path="res://source/assets/scripts/server_handlers/network_processors/network_setup.gd" type="Script" id=1] [ext_resource path="res://source/assets/scripts/server_handlers/network_processors/network_setup.gd" type="Script" id=1]
[ext_resource path="res://source/fonts/oxygen/Oxygen-Regular.ttf" type="DynamicFontData" id=2] [ext_resource path="res://source/fonts/oxygen/Oxygen-Regular.ttf" type="DynamicFontData" id=2]
[ext_resource path="res://source/fonts/oxygen/Oxygen-Bold.ttf" type="DynamicFontData" id=3] [ext_resource path="res://source/fonts/oxygen/Oxygen-Bold.ttf" type="DynamicFontData" id=3]
[ext_resource path="res://source/scenes/OVERLAY/elements/menu_button.tscn" type="PackedScene" id=4]
[ext_resource path="res://source/scenes/GUI/background.tscn" type="PackedScene" id=5] [ext_resource path="res://source/scenes/GUI/background.tscn" type="PackedScene" id=5]
[ext_resource path="res://source/scenes/OVERLAY/elements/floor.tscn" type="PackedScene" id=6] [ext_resource path="res://source/scenes/OVERLAY/elements/floor.tscn" type="PackedScene" id=6]
[ext_resource path="res://source/assets/sprites/GUI/lan_logo.svg" type="Texture" id=7] [ext_resource path="res://source/assets/sprites/GUI/lan_logo.svg" type="Texture" id=7]
@ -333,6 +334,15 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="menu_button" parent="UI" instance=ExtResource( 4 )]
anchor_left = 1.0
anchor_right = 1.0
margin_left = -70.0
margin_top = 20.0
margin_right = -20.0
margin_bottom = 70.0
focus_mode = 0
[node name="spawn_locations" type="Node" parent="."] [node name="spawn_locations" type="Node" parent="."]
[node name="1" type="Position2D" parent="spawn_locations"] [node name="1" type="Position2D" parent="spawn_locations"]

View File

@ -28,7 +28,7 @@ use_mipmaps = true
use_filter = true use_filter = true
font_data = ExtResource( 2 ) font_data = ExtResource( 2 )
[node name="network_setup" type="Control"] [node name="network_setup2" type="Control"]
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
script = ExtResource( 1 ) script = ExtResource( 1 )

View File

@ -0,0 +1,26 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://source/assets/sprites/GUI/bar-background.png" type="Texture" id=1]
[ext_resource path="res://source/assets/sprites/GUI/bar-fill.png" type="Texture" id=2]
[ext_resource path="res://source/assets/scripts/ui_element_handlers/HUD.gd" type="Script" id=3]
[node name="HUD" type="Node2D" groups=[
"Net",
]]
script = ExtResource( 3 )
[node name="health_bar" type="TextureProgress" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -64.0
margin_top = -20.0
margin_right = 64.0
margin_bottom = 20.0
value = 100.0
texture_under = ExtResource( 1 )
texture_progress = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}

View File

@ -7,6 +7,8 @@
[node name="TextureButton" type="TextureButton"] [node name="TextureButton" type="TextureButton"]
margin_right = 40.0 margin_right = 40.0
margin_bottom = 40.0 margin_bottom = 40.0
focus_mode = 0
enabled_focus_mode = 0
texture_normal = ExtResource( 1 ) texture_normal = ExtResource( 1 )
texture_pressed = ExtResource( 3 ) texture_pressed = ExtResource( 3 )
texture_hover = ExtResource( 2 ) texture_hover = ExtResource( 2 )

View File

@ -0,0 +1,20 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://source/assets/sprites/GUI/menu_button.svg" type="Texture" id=1]
[ext_resource path="res://source/assets/sprites/GUI/menu_button_pressed.svg" type="Texture" id=2]
[ext_resource path="res://source/assets/sprites/GUI/menu_button_hover.svg" type="Texture" id=3]
[ext_resource path="res://source/assets/scripts/ui_element_handlers/menu_button.gd" type="Script" id=4]
[node name="menu_button" type="TextureButton"]
margin_right = 40.0
margin_bottom = 40.0
enabled_focus_mode = 0
texture_normal = ExtResource( 1 )
texture_pressed = ExtResource( 2 )
texture_hover = ExtResource( 3 )
script = ExtResource( 4 )
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="pressed" from="." to="." method="_on_menu_button_pressed"]

View File

@ -0,0 +1,120 @@
[gd_scene load_steps=8 format=2]
[ext_resource path="res://source/fonts/oxygen/Oxygen-Bold.ttf" type="DynamicFontData" id=1]
[ext_resource path="res://source/scenes/OVERLAY/elements/button.tscn" type="PackedScene" id=2]
[ext_resource path="res://source/assets/scripts/ui_element_handlers/menu_button_overlay.gd" type="Script" id=3]
[sub_resource type="StyleBoxFlat" id=1]
bg_color = Color( 0, 0, 0, 0.380392 )
[sub_resource type="DynamicFont" id=2]
size = 30
use_mipmaps = true
use_filter = true
font_data = ExtResource( 1 )
[sub_resource type="DynamicFont" id=3]
size = 30
use_mipmaps = true
use_filter = true
font_data = ExtResource( 1 )
[sub_resource type="DynamicFont" id=4]
size = 30
use_mipmaps = true
use_filter = true
font_data = ExtResource( 1 )
[node name="menu_button_overlay" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_top = 2.1189
margin_bottom = 2.1189
script = ExtResource( 3 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="panel" type="Panel" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -960.0
margin_top = -540.0
margin_right = 960.0
margin_bottom = 540.0
custom_styles/panel = SubResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="return_to_game" parent="panel" instance=ExtResource( 2 )]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -150.0
margin_top = -180.0
margin_right = 150.0
margin_bottom = -108.0
focus_mode = 2
enabled_focus_mode = 2
[node name="Label" type="Label" parent="panel/return_to_game"]
anchor_right = 1.0
anchor_bottom = 1.0
custom_fonts/font = SubResource( 2 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "Return to game"
align = 1
valign = 1
[node name="return_to_main_menu" parent="panel" instance=ExtResource( 2 )]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -150.0
margin_top = -36.0
margin_right = 150.0
margin_bottom = 36.0
focus_mode = 2
enabled_focus_mode = 2
[node name="Label" type="Label" parent="panel/return_to_main_menu"]
anchor_right = 1.0
anchor_bottom = 1.0
custom_fonts/font = SubResource( 3 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "Retrun to main menu"
align = 1
valign = 1
[node name="exit_game" parent="panel" instance=ExtResource( 2 )]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -150.0
margin_top = 108.0
margin_right = 150.0
margin_bottom = 180.0
focus_mode = 2
enabled_focus_mode = 2
[node name="Label" type="Label" parent="panel/exit_game"]
anchor_right = 1.0
anchor_bottom = 1.0
custom_fonts/font = SubResource( 4 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "Exit game"
align = 1
valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="pressed" from="panel/return_to_game" to="." method="_on_return_to_game_pressed"]
[connection signal="pressed" from="panel/return_to_main_menu" to="." method="_on_return_to_main_menu_pressed"]
[connection signal="pressed" from="panel/exit_game" to="." method="_on_exit_game_pressed"]