diff --git a/source/assets/scripts/player_handlers/player_bullet.gd b/source/assets/scripts/player_handlers/player_bullet.gd index 76106da..d3d5199 100644 --- a/source/assets/scripts/player_handlers/player_bullet.gd +++ b/source/assets/scripts/player_handlers/player_bullet.gd @@ -50,7 +50,7 @@ sync func destroy() -> void: queue_free() -func _on_Destroy_timer_timeout(): +func _on_destroy_timer_timeout(): if get_tree().has_network_peer(): if get_tree().is_network_server(): rpc("destroy") diff --git a/source/assets/scripts/server_handlers/network_processors/network_setup.gd b/source/assets/scripts/server_handlers/network_processors/network_setup.gd index 93bf673..590e106 100644 --- a/source/assets/scripts/server_handlers/network_processors/network_setup.gd +++ b/source/assets/scripts/server_handlers/network_processors/network_setup.gd @@ -51,6 +51,7 @@ func _ready() -> void: func _process(_delta: float) -> void: if Input.is_action_just_pressed("esc") and username.is_visible_in_tree(): username.hide() + controls.show() if get_tree().network_peer != null: if get_tree().get_network_connected_peers().size() >= 0 and get_tree().is_network_server(): diff --git a/source/assets/scripts/server_handlers/server_processors/server_browser.gd b/source/assets/scripts/server_handlers/server_processors/server_browser.gd index 44081ef..c9b5439 100644 --- a/source/assets/scripts/server_handlers/server_processors/server_browser.gd +++ b/source/assets/scripts/server_handlers/server_processors/server_browser.gd @@ -13,6 +13,7 @@ func _ready() -> void: func _process(delta): if Input.is_action_just_pressed("esc") and popup_screen.is_visible_in_tree(): popup_screen.hide() + $controls.show() func _on_server_listener_new_server(serverInfo): diff --git a/source/assets/scripts/ui_element_handlers/username_text.gd b/source/assets/scripts/ui_element_handlers/username_text.gd index 42618e2..c009c2f 100644 --- a/source/assets/scripts/ui_element_handlers/username_text.gd +++ b/source/assets/scripts/ui_element_handlers/username_text.gd @@ -2,12 +2,15 @@ extends Node2D var player_following = null var text = "" setget text_set + +var distanceToPlayerOffset = -100 + onready var label = $Label func _process(delta: float) -> void: if player_following != null: - global_position = player_following.global_position + global_position = player_following.global_position + Vector2(0,distanceToPlayerOffset).rotated(player_following.rotation) func text_set(new_text) -> void: diff --git a/source/entities/shooting/player_bullet.tscn b/source/entities/shooting/player_bullet.tscn index 1b30fbc..d3813c1 100644 --- a/source/entities/shooting/player_bullet.tscn +++ b/source/entities/shooting/player_bullet.tscn @@ -6,18 +6,21 @@ [sub_resource type="RectangleShape2D" id=1] extents = Vector2( 22.0883, 10 ) -[node name="player_bullet" type="Sprite" groups=["Net"]] +[node name="player_bullet" type="Sprite" groups=[ +"Net", +]] texture = ExtResource( 1 ) script = ExtResource( 2 ) -[node name="hitbox" type="Area2D" parent="." groups=["Player_damager"]] +[node name="hitbox" type="Area2D" parent="." groups=[ +"Player_damager", +]] [node name="CollisionShape2D" type="CollisionShape2D" parent="hitbox"] visible = false shape = SubResource( 1 ) [node name="destroy_timer" type="Timer" parent="."] -wait_time = 5.0 one_shot = true autostart = true diff --git a/source/levels/trinity_site/trinity_site_level.tscn b/source/levels/trinity_site/trinity_site_level.tscn index b3db345..f9d472b 100644 --- a/source/levels/trinity_site/trinity_site_level.tscn +++ b/source/levels/trinity_site/trinity_site_level.tscn @@ -142,10 +142,10 @@ margin_left = 2.37842 margin_top = -35.5 margin_right = 2.37842 margin_bottom = 106.5 -custom_fonts/font = SubResource( 1 ) custom_colors/font_color_shadow = Color( 0, 0, 0, 1 ) custom_constants/shadow_offset_x = 6 custom_constants/shadow_offset_y = 6 +custom_fonts/font = SubResource( 1 ) text = "You are the winner" align = 1 valign = 1 diff --git a/source/scenes/GUI/network_setup.tscn b/source/scenes/GUI/network_setup.tscn index 62ce7ce..c03b136 100644 --- a/source/scenes/GUI/network_setup.tscn +++ b/source/scenes/GUI/network_setup.tscn @@ -14,15 +14,21 @@ [ext_resource path="res://source/scenes/OVERLAY/elements/wall.tscn" type="PackedScene" id=13] [ext_resource path="res://source/assets/sprites/GUI/server_title.svg" type="Texture" id=15] -[sub_resource type="DynamicFont" id=11] +[sub_resource type="DynamicFont" id=1] size = 36 use_mipmaps = true use_filter = true font_data = ExtResource( 2 ) -[sub_resource type="StyleBoxEmpty" id=12] +[sub_resource type="StyleBoxEmpty" id=2] -[sub_resource type="StyleBoxEmpty" id=4] +[sub_resource type="StyleBoxEmpty" id=3] + +[sub_resource type="DynamicFont" id=4] +size = 36 +use_mipmaps = true +use_filter = true +font_data = ExtResource( 2 ) [sub_resource type="DynamicFont" id=5] size = 36 @@ -31,18 +37,12 @@ use_filter = true font_data = ExtResource( 2 ) [sub_resource type="DynamicFont" id=6] -size = 36 -use_mipmaps = true -use_filter = true -font_data = ExtResource( 2 ) - -[sub_resource type="DynamicFont" id=9] size = 88 use_mipmaps = true use_filter = true font_data = ExtResource( 3 ) -[sub_resource type="DynamicFont" id=10] +[sub_resource type="DynamicFont" id=7] size = 22 use_mipmaps = true use_filter = true @@ -177,7 +177,7 @@ margin_left = -225.0 margin_top = -25.0 margin_right = -225.0 margin_bottom = -25.0 -custom_fonts/font = SubResource( 11 ) +custom_fonts/font = SubResource( 1 ) custom_colors/font_color = Color( 0, 0, 0, 1 ) text = "Enter your username" align = 1 @@ -209,9 +209,9 @@ margin_left = -175.0 margin_top = -28.0 margin_right = 175.0 margin_bottom = 28.0 -custom_styles/focus = SubResource( 12 ) -custom_styles/normal = SubResource( 4 ) -custom_fonts/font = SubResource( 5 ) +custom_styles/focus = SubResource( 2 ) +custom_styles/normal = SubResource( 3 ) +custom_fonts/font = SubResource( 4 ) custom_colors/selection_color = Color( 0.8, 0.8, 0.8, 1 ) align = 1 placeholder_text = "username" @@ -233,7 +233,7 @@ margin_bottom = 97.0 [node name="Label" type="Label" parent="multiplayer_configure/popup_screen/panel/confirm"] anchor_right = 1.0 anchor_bottom = 1.0 -custom_fonts/font = SubResource( 6 ) +custom_fonts/font = SubResource( 5 ) custom_colors/font_color = Color( 0, 0, 0, 1 ) text = "CONFIRM" align = 1 @@ -306,7 +306,7 @@ margin_left = -319.0 margin_top = -56.0 margin_right = 319.0 margin_bottom = 56.0 -custom_fonts/font = SubResource( 9 ) +custom_fonts/font = SubResource( 6 ) custom_colors/font_color = Color( 0.439216, 0.666667, 1, 0.27451 ) align = 1 valign = 1 @@ -324,7 +324,7 @@ margin_left = -116.5 margin_top = 60.0 margin_right = 116.5 margin_bottom = 89.0 -custom_fonts/font = SubResource( 10 ) +custom_fonts/font = SubResource( 7 ) custom_colors/font_color = Color( 0.439216, 0.666667, 1, 0.27451 ) text = "WAITING FOR PLAYERS" align = 1 diff --git a/source/scenes/OVERLAY/elements/simple_prompt.tscn b/source/scenes/OVERLAY/elements/simple_prompt.tscn index 16826ac..7d394fb 100644 --- a/source/scenes/OVERLAY/elements/simple_prompt.tscn +++ b/source/scenes/OVERLAY/elements/simple_prompt.tscn @@ -55,8 +55,8 @@ margin_bottom = 155.5 [node name="OK" type="Label" parent="Panel/ok"] anchor_right = 1.0 anchor_bottom = 1.0 -custom_fonts/font = SubResource( 2 ) custom_colors/font_color = Color( 0, 0, 0, 1 ) +custom_fonts/font = SubResource( 2 ) text = "OK" align = 1 valign = 1 diff --git a/source/scenes/OVERLAY/elements/username_text.tscn b/source/scenes/OVERLAY/elements/username_text.tscn index 5d70358..ca2df41 100644 --- a/source/scenes/OVERLAY/elements/username_text.tscn +++ b/source/scenes/OVERLAY/elements/username_text.tscn @@ -16,10 +16,10 @@ z_index = 10 script = ExtResource( 2 ) [node name="Label" type="Label" parent="."] -margin_left = -199.67 -margin_top = -131.674 -margin_right = 194.33 -margin_bottom = -55.6742 +margin_left = -200.0 +margin_top = -40.0 +margin_right = 200.0 +margin_bottom = 40.0 custom_fonts/font = SubResource( 1 ) text = "null" align = 1