diff --git a/project.godot b/project.godot index c90e8a2..d7b7d0b 100644 --- a/project.godot +++ b/project.godot @@ -21,10 +21,6 @@ Global="*res://source/assets/scripts/server_handlers/global.gd" PersistentNodes="*res://source/scenes/OVERLAY/elements/persistent_nodes.tscn" FullscreenController="*res://source/assets/scripts/system/fullscreen_controller.gd" -[debug] - -settings/stdout/print_fps=true - [display] window/size/width=1920 diff --git a/source/assets/scripts/player_handlers/player_body_handler.gd b/source/assets/scripts/player_handlers/player_body_handler.gd index cdfebf6..1d190b1 100644 --- a/source/assets/scripts/player_handlers/player_body_handler.gd +++ b/source/assets/scripts/player_handlers/player_body_handler.gd @@ -163,8 +163,8 @@ func _process(_delta: float) -> void: clientPhase = puppet_phase Global.set_current_phase(clientPhase) $"weaponHolder/Player-character-theme-gun".play(theme) - particleImage.load("res://source/assets/sprites/character/player/theme/" + theme + "/na/Player-character-theme-particle-"+theme+".png") - particleTexture.create_from_image(particleImage) +# particleImage.load("res://source/assets/sprites/character/player/theme/" + theme + "/na/Player-character-theme-particle-" + theme + ".png") +# particleTexture.create_from_image(particleImage) $Particles2D.texture = particleTexture if username_text_instance != null: username_text_instance.name = "username" + name @@ -251,9 +251,9 @@ func _physics_process(delta) -> void: if not user_input["right"] and not user_input["left"]: velocityVDIR.x = move_toward(velocityVDIR.x, 0, deccelerationSpeed) if velocityVDIR.x != 0 and maxMovementSpeed.x == 200: - $player_animated_sprite.play("move-speed-"+direction+"-"+theme) + $player_animated_sprite.play("move-speed-" + direction + "-" + theme) elif maxMovementSpeed.x > 200 and not characterStates["jumped"]: - $player_animated_sprite.play("boost-speed-"+direction+"-"+theme) + $player_animated_sprite.play("boost-speed-" + direction + "-" + theme) $Particles2D.set_emitting(true) else: #$player_animated_sprite.play("idle-speed-"+direction+"-"+theme) @@ -279,12 +279,12 @@ func _physics_process(delta) -> void: direction = puppet_direction if velocityVDIR.x != 0 and maxMovementSpeed.x == 200: - $player_animated_sprite.play("move-speed-"+direction+"-"+theme) + $player_animated_sprite.play("move-speed-" + direction + "-" + theme) elif maxMovementSpeed.x > 200 and not characterStates["jumped"]: - $player_animated_sprite.play("boost-speed-"+direction+"-"+theme) + $player_animated_sprite.play("boost-speed-" + direction + "-" + theme) $Particles2D.set_emitting(true) else: - $player_animated_sprite.play("idle-speed-"+direction+"-"+theme) + $player_animated_sprite.play("idle-speed-" + direction + "-" + theme) $Particles2D.set_emitting(false) rotate_weapon() @@ -442,13 +442,13 @@ sync func enable() -> void: $player_collider.disabled = false $hitbox/CollisionShape2D.disabled = false $weaponHolder.disabled = false - if get_tree().has_network_peer(): if is_network_master(): Global.player_master = self - if not Global.alive_players.has(self): Global.alive_players.append(self) + weaponPositionalOffset = Vector2(-$"weaponHolder/Player-character-theme-gun-na3".texture.get_width() * $"weaponHolder/Player-character-theme-gun-na3".scale.x / 2,-$"weaponHolder/Player-character-theme-gun-na3".texture.get_height() * $"weaponHolder/Player-character-theme-gun-na3".scale.y / 2) + Vector2(-$weaponHolder.get_shape().get_radius(), 0) + $"weaponHolder/Player-character-theme-gun".position = weaponPositionalOffset sync func destroy() -> void: @@ -459,7 +459,6 @@ sync func destroy() -> void: $hitbox/CollisionShape2D.disabled = true $weaponHolder.disabled = true Global.alive_players.erase(self) - if get_tree().has_network_peer(): if is_network_master(): Global.player_master = null @@ -473,7 +472,6 @@ func _exit_tree() -> void: func rotate_weapon(): - #equip_weapon() weaponPosition = $"weaponHolder/Player-character-theme-gun".position weaponPosition -= Vector2(weaponPositionalOffset.x,0).rotated(deg2rad(weaponAngle)) + Vector2(0,weaponPositionalOffset.y) if user_input["r_inc"]: 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 e49b1ed..9cc95fa 100644 --- a/source/assets/scripts/server_handlers/network_processors/network_setup.gd +++ b/source/assets/scripts/server_handlers/network_processors/network_setup.gd @@ -1,6 +1,6 @@ extends Control -var player_amount = 0 +var player_amount = 1 var player = load("res://source/entities/player/player_node.tscn") @@ -12,19 +12,20 @@ onready var multiplayer_config_ui = $multiplayer_configure onready var username_text_edit = $multiplayer_configure/popup_screen/panel/username_text_edit onready var username = $multiplayer_configure/popup_screen onready var controls = $multiplayer_configure/controls - -onready var device_ip_address = $UI/device_ip_address -onready var start_game = $UI/start_game +onready var device_ip_address = $lobby_controls/device_ip_address +onready var start_game = $lobby_controls/start_game onready var background_lobby = $background_lobby -onready var text = $UI/text -onready var menu_botton = $UI/menu_button +onready var text = $lobby_controls/text +onready var menu_botton = $lobby_controls/menu_button +onready var loby_controls = $lobby_controls func _ready() -> void: username.hide() - background_lobby.hide() device_ip_address.hide() text.hide() + + Global.start_game(false) @@ -38,10 +39,11 @@ func _ready() -> void: device_ip_address.text = Network.ip_address if get_tree().network_peer != null: - multiplayer_config_ui.hide() - background_lobby.show() + menu_botton.show() device_ip_address.show() text.show() + multiplayer_config_ui.hide() + $background.hide() current_spawn_location_instance_number = 1 # warning-ignore:shadowed_variable for player in PersistentNodes.get_children(): @@ -54,12 +56,15 @@ func _ready() -> void: current_player_for_spawn_location_number = player else: start_game.hide() + menu_botton.hide() func _process(_delta: float) -> void: if Input.is_action_just_pressed("esc") and username.is_visible_in_tree(): username.hide() controls.show() + elif Input.is_action_just_pressed("esc") and not username.is_visible_in_tree(): + get_tree().change_scene("res://source/scenes/GUI/main_menu.tscn") if get_tree().network_peer != null: if get_tree().get_network_connected_peers().size() >= player_amount and get_tree().is_network_server(): @@ -138,6 +143,7 @@ func _on_confirm_pressed(): func show_lobby(): multiplayer_config_ui.hide() + $background.hide() device_ip_address.show() background_lobby.show() text.show() 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 c9b5439..6ef85e5 100644 --- a/source/assets/scripts/server_handlers/server_processors/server_browser.gd +++ b/source/assets/scripts/server_handlers/server_processors/server_browser.gd @@ -14,6 +14,8 @@ func _process(delta): if Input.is_action_just_pressed("esc") and popup_screen.is_visible_in_tree(): popup_screen.hide() $controls.show() + elif Input.is_action_just_pressed("esc") and not popup_screen.is_visible_in_tree():\ + get_tree().change_scene("res://source/scenes/GUI/network_setup.tscn") func _on_server_listener_new_server(serverInfo): diff --git a/source/assets/scripts/server_handlers/trinity_site_level.gd b/source/assets/scripts/server_handlers/trinity_site_level.gd index 36ffddd..b4754c2 100644 --- a/source/assets/scripts/server_handlers/trinity_site_level.gd +++ b/source/assets/scripts/server_handlers/trinity_site_level.gd @@ -5,10 +5,12 @@ var current_player_location_instance_number = null var time = 20 onready var phase = $controls/timer/phase onready var timer = $controls/timer/timer +var overlay = Global.instance_node(load("res://source/scenes/OVERLAY/elements/menu_button_overlay.tscn"), Global.ui) var globalActivePhase = null func _ready() -> void: +# warning-ignore:return_value_discarded get_tree().connect("network_peer_disconnected", self, "_player_disconnected") if get_tree().is_network_server(): setup_player_positions() @@ -33,6 +35,9 @@ func _player_disconnected(id) -> void: func _process(_delta): +# if Input.is_action_just_pressed("esc"): +# Global.instance_node(load("res://source/scenes/OVERLAY/elements/menu_button_overlay.tscn"), Global.ui) + globalActivePhase = Global.get_current_phase() if globalActivePhase["active"] != null: phase.text = str(globalActivePhase["active"]["phase_name"]) diff --git a/source/assets/scripts/ui_element_handlers/game_UI.gd b/source/assets/scripts/ui_element_handlers/game_UI.gd index 3efd57b..9c0b96e 100644 --- a/source/assets/scripts/ui_element_handlers/game_UI.gd +++ b/source/assets/scripts/ui_element_handlers/game_UI.gd @@ -1,7 +1,7 @@ extends CanvasLayer # if 0, then singleplayer will work, if 1, then multiplayer only -var winner_amount = 0 +var winner_amount = 1 onready var win_timer = $winner/win_timer onready var winner = $winner diff --git a/source/assets/scripts/ui_element_handlers/menu_button.gd b/source/assets/scripts/ui_element_handlers/menu_button.gd index 43dce5b..ec7c55f 100644 --- a/source/assets/scripts/ui_element_handlers/menu_button.gd +++ b/source/assets/scripts/ui_element_handlers/menu_button.gd @@ -1,8 +1,15 @@ 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 _process(delta) -> void: + if Input.is_action_just_pressed("esc") and get_tree().get_current_scene().get_child(2).get_children() == []: + Global.instance_node(load("res://source/scenes/OVERLAY/elements/menu_button_overlay.tscn"), Global.ui) + elif Input.is_action_just_pressed("esc") and get_tree().get_current_scene().get_child(2).get_children() != [] and not get_tree().get_current_scene().get_child(2).get_child(0).is_visible_in_tree(): + get_tree().get_current_scene().get_child(2).get_child(0).show() + elif Input.is_action_just_pressed("esc") and get_tree().get_current_scene().get_child(2).get_children() != [] and get_tree().get_current_scene().get_child(2).get_child(0).is_visible_in_tree(): + get_tree().get_current_scene().get_child(2).get_child(0).hide() + + func _on_menu_button_pressed(): # warning-ignore:return_value_discarded diff --git a/source/assets/scripts/ui_element_handlers/menu_button_overlay.gd b/source/assets/scripts/ui_element_handlers/menu_button_overlay.gd index fc80f87..c5658da 100644 --- a/source/assets/scripts/ui_element_handlers/menu_button_overlay.gd +++ b/source/assets/scripts/ui_element_handlers/menu_button_overlay.gd @@ -1,12 +1,6 @@ extends Control -func _process(delta) -> void: -# print(str(self)) - if Input.is_action_just_pressed("esc"): - hide() - - func _on_return_to_game_pressed(): hide() diff --git a/source/entities/player/player_node.tscn b/source/entities/player/player_node.tscn index 276739b..ee90c29 100644 --- a/source/entities/player/player_node.tscn +++ b/source/entities/player/player_node.tscn @@ -173,41 +173,6 @@ [sub_resource type="SpriteFrames" id=2] animations = [ { -"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, -"name": "move-speed-left-03", -"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": "move-speed-left-04", -"speed": 35.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 ) ], -"loop": true, -"name": "boost-speed-left-03", -"speed": 50.0 -}, { -"frames": [ ExtResource( 73 ), ExtResource( 57 ), ExtResource( 65 ), ExtResource( 64 ), ExtResource( 54 ), ExtResource( 71 ), ExtResource( 58 ), ExtResource( 66 ), ExtResource( 62 ), ExtResource( 59 ), ExtResource( 56 ), ExtResource( 60 ), ExtResource( 63 ), ExtResource( 50 ), ExtResource( 61 ), ExtResource( 67 ), ExtResource( 72 ), ExtResource( 51 ), ExtResource( 68 ), ExtResource( 69 ) ], -"loop": true, -"name": "move-speed-left-02", -"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": "idle-speed-left-04", -"speed": 25.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( 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": "idle-speed-left-01", -"speed": 25.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", @@ -218,21 +183,21 @@ animations = [ { "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 ) ], +"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-right-03", -"speed": 50.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 +"name": "idle-speed-left-01", +"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": "move-speed-right-04", "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 ) ], +"loop": true, +"name": "boost-speed-right-01", +"speed": 50.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": "idle-speed-right-04", @@ -248,15 +213,10 @@ animations = [ { "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 ) ], +"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, -"name": "boost-speed-right-01", -"speed": 50.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": "boost-speed-right-02", -"speed": 50.0 +"name": "move-speed-left-03", +"speed": 35.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, @@ -267,6 +227,46 @@ animations = [ { "loop": true, "name": "move-speed-right-01", "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": "boost-speed-right-02", +"speed": 50.0 +}, { +"frames": [ ExtResource( 73 ), ExtResource( 57 ), ExtResource( 65 ), ExtResource( 64 ), ExtResource( 54 ), ExtResource( 71 ), ExtResource( 58 ), ExtResource( 66 ), ExtResource( 62 ), ExtResource( 59 ), ExtResource( 56 ), ExtResource( 60 ), ExtResource( 63 ), ExtResource( 50 ), ExtResource( 61 ), ExtResource( 67 ), ExtResource( 72 ), ExtResource( 51 ), ExtResource( 68 ), ExtResource( 69 ) ], +"loop": true, +"name": "move-speed-left-02", +"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": "move-speed-left-04", +"speed": 35.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 ) ], +"loop": true, +"name": "boost-speed-left-03", +"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": "idle-speed-left-04", +"speed": 25.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( 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 +}, { +"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 } ] [sub_resource type="RectangleShape2D" id=3] @@ -297,14 +297,14 @@ radius = 41.5403 [sub_resource type="SpriteFrames" id=6] animations = [ { -"frames": [ ExtResource( 170 ) ], +"frames": [ ExtResource( 169 ) ], "loop": true, -"name": "02", +"name": "04", "speed": 5.0 }, { "frames": [ ExtResource( 170 ) ], "loop": true, -"name": "03", +"name": "02", "speed": 5.0 }, { "frames": [ ExtResource( 27 ) ], @@ -312,13 +312,16 @@ animations = [ { "name": "01", "speed": 5.0 }, { -"frames": [ ExtResource( 169 ) ], +"frames": [ ExtResource( 170 ) ], "loop": true, -"name": "04", +"name": "03", "speed": 5.0 } ] -[node name="player" type="KinematicBody2D" groups=["Net", "Player"]] +[node name="player" type="KinematicBody2D" groups=[ +"Net", +"Player", +]] script = ExtResource( 11 ) [node name="player_collider" type="CollisionShape2D" parent="."] @@ -369,7 +372,7 @@ texture = ExtResource( 26 ) shape = SubResource( 5 ) [node name="Player-character-theme-gun-na3" type="Sprite" parent="weaponHolder"] -scale = Vector2( 0.3, 0.25 ) +scale = Vector2( 0.25, 0.25 ) texture = ExtResource( 171 ) [node name="Player-character-theme-gun" type="AnimatedSprite" parent="weaponHolder"] diff --git a/source/entities/shooting/Line_Trajectory/Line_Barrel.tscn b/source/entities/shooting/Line_Trajectory/Line_Barrel.tscn index 8821c37..6582711 100644 --- a/source/entities/shooting/Line_Trajectory/Line_Barrel.tscn +++ b/source/entities/shooting/Line_Trajectory/Line_Barrel.tscn @@ -4,3 +4,7 @@ [node name="Line_Barrel" type="Line2D"] script = ExtResource( 1 ) + +[node name="Timer" type="Timer" parent="."] + +[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"] diff --git a/source/scenes/GUI/background.tscn b/source/scenes/GUI/background.tscn index c0ce0fb..b0f415a 100644 --- a/source/scenes/GUI/background.tscn +++ b/source/scenes/GUI/background.tscn @@ -7,7 +7,6 @@ [node name="background_main_menu" type="Sprite" parent="."] position = Vector2( 960, 540 ) -z_index = -10 z_as_relative = false texture = ExtResource( 6 ) __meta__ = { @@ -16,3 +15,4 @@ __meta__ = { [node name="floor" parent="." instance=ExtResource( 5 )] position = Vector2( 960, 1016 ) +z_as_relative = false diff --git a/source/scenes/GUI/network_setup.tscn b/source/scenes/GUI/network_setup.tscn index 0e3d8d7..2423560 100644 --- a/source/scenes/GUI/network_setup.tscn +++ b/source/scenes/GUI/network_setup.tscn @@ -54,6 +54,7 @@ anchor_right = 1.0 anchor_bottom = 1.0 script = ExtResource( 1 ) __meta__ = { +"_edit_lock_": true, "_edit_use_anchors_": false } @@ -66,13 +67,15 @@ margin_left = 2.5199 margin_right = 2.5199 rect_pivot_offset = Vector2( -2200.59, -462.965 ) __meta__ = { +"_edit_lock_": true, "_edit_use_anchors_": false } [node name="controls" type="Control" parent="multiplayer_configure"] -margin_right = 40.0 -margin_bottom = 40.0 +anchor_right = 1.0 +anchor_bottom = 1.0 __meta__ = { +"_edit_lock_": true, "_edit_use_anchors_": false } @@ -133,10 +136,14 @@ __meta__ = { } [node name="return" parent="multiplayer_configure/controls" instance=ExtResource( 9 )] -margin_left = 810.0 -margin_top = 584.0 -margin_right = 1110.0 -margin_bottom = 656.0 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -150.0 +margin_top = 44.0 +margin_right = 150.0 +margin_bottom = 116.0 [node name="Label" type="Label" parent="multiplayer_configure/controls/return"] anchor_left = 0.5 @@ -161,6 +168,7 @@ __meta__ = { anchor_right = 1.0 anchor_bottom = 1.0 __meta__ = { +"_edit_lock_": true, "_edit_use_anchors_": false } @@ -245,6 +253,7 @@ __meta__ = { [node name="background_lobby" type="Node2D" parent="."] z_index = -1 +z_as_relative = false [node name="background_lobby" type="Sprite" parent="background_lobby"] position = Vector2( 960, 540 ) @@ -265,21 +274,28 @@ position = Vector2( 0, -603 ) [node name="floor" parent="background_lobby" instance=ExtResource( 6 )] position = Vector2( 960, 1016 ) -[node name="UI" type="CanvasLayer" parent="."] -layer = 0 +[node name="lobby_controls" type="Control" parent="."] +margin_right = 40.0 +margin_bottom = 40.0 +__meta__ = { +"_edit_lock_": true, +"_edit_use_anchors_": false +} + +[node name="UI" type="CanvasLayer" parent="lobby_controls"] script = ExtResource( 11 ) -[node name="start_game" parent="UI" instance=ExtResource( 9 )] +[node name="start_game" parent="lobby_controls" instance=ExtResource( 9 )] anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -margin_left = -150.0 -margin_top = 100.0 -margin_right = 150.0 -margin_bottom = 172.0 +margin_left = 790.0 +margin_top = 620.0 +margin_right = 1090.0 +margin_bottom = 692.0 -[node name="Label" type="Label" parent="UI/start_game"] +[node name="Label" type="Label" parent="lobby_controls/start_game"] anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 @@ -294,49 +310,52 @@ text = "START" align = 1 valign = 1 __meta__ = { +"_edit_lock_": true, "_edit_use_anchors_": false } -[node name="device_ip_address" type="Label" parent="UI"] +[node name="device_ip_address" type="Label" parent="lobby_controls"] show_behind_parent = true anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -margin_left = -319.0 -margin_top = -56.0 -margin_right = 319.0 -margin_bottom = 56.0 +margin_left = 621.0 +margin_top = 464.0 +margin_right = 1259.0 +margin_bottom = 576.0 custom_fonts/font = SubResource( 6 ) custom_colors/font_color = Color( 0.439216, 0.666667, 1, 0.27451 ) align = 1 valign = 1 __meta__ = { +"_edit_lock_": true, "_edit_use_anchors_": false } -[node name="text" type="Label" parent="UI"] +[node name="text" type="Label" parent="lobby_controls"] show_behind_parent = true anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -margin_left = -116.5 -margin_top = 60.0 -margin_right = 116.5 -margin_bottom = 89.0 +margin_left = 823.5 +margin_top = 580.0 +margin_right = 1056.5 +margin_bottom = 609.0 custom_fonts/font = SubResource( 7 ) custom_colors/font_color = Color( 0.439216, 0.666667, 1, 0.27451 ) text = "WAITING FOR PLAYERS" align = 1 valign = 1 __meta__ = { +"_edit_lock_": true, "_edit_use_anchors_": false } -[node name="menu_button" parent="UI" instance=ExtResource( 4 )] -margin_right = 50.0 -margin_bottom = 50.0 +[node name="menu_button" parent="lobby_controls" instance=ExtResource( 4 )] +margin_right = 60.0 +margin_bottom = 60.0 [node name="spawn_locations" type="Node" parent="."] @@ -356,4 +375,4 @@ position = Vector2( 1536, 860 ) [connection signal="pressed" from="multiplayer_configure/controls/join_server" to="." method="_on_join_server_pressed"] [connection signal="pressed" from="multiplayer_configure/controls/return" to="." method="_on_return_pressed"] [connection signal="pressed" from="multiplayer_configure/popup_screen/panel/confirm" to="." method="_on_confirm_pressed"] -[connection signal="pressed" from="UI/start_game" to="." method="_on_start_game_pressed"] +[connection signal="pressed" from="lobby_controls/start_game" to="." method="_on_start_game_pressed"]