diff --git a/.godot/editor/editor_layout.cfg b/.godot/editor/editor_layout.cfg index 3c5bbe1..6a30d2b 100644 --- a/.godot/editor/editor_layout.cfg +++ b/.godot/editor/editor_layout.cfg @@ -4,7 +4,7 @@ dock_1_selected_tab_idx=0 dock_2_selected_tab_idx=0 dock_3_selected_tab_idx=0 dock_4_selected_tab_idx=0 -dock_5_selected_tab_idx=0 +dock_5_selected_tab_idx=1 dock_6_selected_tab_idx=0 dock_7_selected_tab_idx=0 dock_8_selected_tab_idx=0 @@ -30,15 +30,15 @@ dock_5="Inspector,Node,History" open_scenes=PackedStringArray("res://Scenes/world.tscn", "res://Prefabs/player.tscn") center_split_offset=-279 selected_default_debugger_tab_idx=0 -selected_main_editor_idx=2 +selected_main_editor_idx=0 current_scene="res://Scenes/world.tscn" selected_bottom_panel_item=0 [ScriptEditor] -open_scripts=["res://Scripts/chicken.gd", "res://Scripts/HatHider.gd", "res://Scripts/Player.gd", "res://Scripts/world.gd"] +open_scripts=["res://Scripts/Player.gd", "res://Scripts/world.gd"] selected_script="res://Scripts/world.gd" -open_help=["@GlobalScope", "ENetMultiplayerPeer", "ENetPacketPeer", "GeometryInstance3D", "InputEventJoypadMotion", "InputEventMouseMotion"] +open_help=[] script_split_offset=70 list_split_offset=0 diff --git a/.godot/editor/filesystem_cache8 b/.godot/editor/filesystem_cache8 index 544055c..bf4931c 100644 --- a/.godot/editor/filesystem_cache8 +++ b/.godot/editor/filesystem_cache8 @@ -1,5 +1,5 @@ ea4bc82a6ad023ab7ee23ee620429895 -::res://::1699751602 +::res://::1699824328 export_presets.cfg::TextFile::-1::1699670416::0::1::::<><>:: icon.svg::CompressedTexture2D::8963615070695796116::1699485144::1699485149::1::::<><>:: ::res://addons/::1699501524 @@ -310,15 +310,15 @@ lambert1_metallicRoughness.png::CompressedTexture2D::8931258458639185901::169966 lambert1_normal.png::CompressedTexture2D::3998376482152544164::1699662585::1699662585::1::::<><>:: ::res://Occlusion Data/::1699669336 environment.occ::ArrayOccluder3D::2660494726846166203::1699668360::0::1::::<><>:: -::res://Prefabs/::1699751580 -player.tscn::PackedScene::4444783912067201683::1699751580::0::1::::<><>::res://Scripts/Player.gd<>uid://da1qh4xri24f2::::res://Models/kimber_1911/scene.gltf<>uid://d164amgdtaa5k::::res://Models/funny_rubber_chicken/chicken.tscn<>uid://bx0esoasfh733::::res://addons/kenney_particle_pack/star_06.png -::res://Scenes/::1699669972 +::res://Prefabs/::1699762893 +player.tscn::PackedScene::4444783912067201683::1699762893::0::1::::<><>::res://Scripts/Player.gd<>uid://da1qh4xri24f2::::res://Models/kimber_1911/scene.gltf<>uid://d164amgdtaa5k::::res://Models/funny_rubber_chicken/chicken.tscn<>uid://bx0esoasfh733::::res://addons/kenney_particle_pack/star_06.png<>uid://cfwx1moklfkfj::::res://Sound Effects/weapon_gun_1911_A_41.ogg +::res://Scenes/::1699762893 environment.tscn::PackedScene::8256961957080777526::1699669972::0::1::::<><>::uid://ca0iv4endjdmn -world.tscn::PackedScene::1877808985457939721::1699669012::0::1::::<><>::res://Scripts/world.gd<>uid://dpvy7sm57pjn7 -::res://Scripts/::1699670218 +world.tscn::PackedScene::1877808985457939721::1699762893::0::1::::<><>::res://Scripts/world.gd<>uid://dpvy7sm57pjn7::::res://Scenes/environment.tscn<>uid://dhytg0w8gqdob::::res://addons/kenney_particle_pack/circle_05.png +::res://Scripts/::1699760407 chicken.gd::GDScript::-1::1699544273::0::1::::<>Node3D<>:: HatHider.gd::GDScript::-1::1699664681::0::1::::<>Node3D<>:: -Player.gd::GDScript::-1::1699670218::0::1::::<>CharacterBody3D<>:: -world.gd::GDScript::-1::1699662585::0::1::::<>Node<>:: -::res://Sound Effects/::1699751712 +Player.gd::GDScript::-1::1699760363::0::1::::<>CharacterBody3D<>:: +world.gd::GDScript::-1::1699760407::0::1::::<>Node<>:: +::res://Sound Effects/::1699751713 weapon_gun_1911_A_41.ogg::AudioStreamOggVorbis::5170645470017560819::1699751712::1699751713::1::::<><>:: diff --git a/.godot/editor/filesystem_update4 b/.godot/editor/filesystem_update4 index 7f18568..a0470b9 100644 --- a/.godot/editor/filesystem_update4 +++ b/.godot/editor/filesystem_update4 @@ -1,4 +1,3 @@ res://Prefabs/player.tscn -res://Scenes/world.tscn res://Scripts/Player.gd -res://Scripts/world.gd +res://Scenes/world.tscn diff --git a/.godot/editor/player.tscn-editstate-10d6ba27c95124e9e2f66cb8ebb57635.cfg b/.godot/editor/player.tscn-editstate-10d6ba27c95124e9e2f66cb8ebb57635.cfg index f80d349..6d46937 100644 --- a/.godot/editor/player.tscn-editstate-10d6ba27c95124e9e2f66cb8ebb57635.cfg +++ b/.godot/editor/player.tscn-editstate-10d6ba27c95124e9e2f66cb8ebb57635.cfg @@ -174,4 +174,4 @@ Anim={ "zfar": 4000.01, "znear": 0.05 } -selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17665/@Control@697/@Panel@698/@VBoxContainer@706/@HSplitContainer@709/@HSplitContainer@717/@HSplitContainer@725/@VBoxContainer@726/@VSplitContainer@728/@VSplitContainer@754/@VBoxContainer@755/@PanelContainer@800/MainScreen/@CanvasItemEditor@10090/@VSplitContainer@9915/@HSplitContainer@9917/@HSplitContainer@9919/@Control@9920/@SubViewportContainer@9921/@SubViewport@9922/World")]) +selected_nodes=Array[NodePath]([]) diff --git a/.godot/editor/project_metadata.cfg b/.godot/editor/project_metadata.cfg index 080f3be..15d7fb9 100644 --- a/.godot/editor/project_metadata.cfg +++ b/.godot/editor/project_metadata.cfg @@ -7,7 +7,7 @@ use_advanced_connections=false run_live_debug=true run_reload_scripts=true -run_debug_instances=1 +run_debug_instances=2 [dialog_bounds] @@ -20,7 +20,7 @@ export=Rect2(830, 371, 900, 708) [recent_files] scenes=["res://Prefabs/player.tscn", "res://Scenes/world.tscn", "res://Models/environment.glb", "res://Scenes/environment.tscn", "res://Models/Hats/11.tscn", "res://Models/Hats/10.tscn", "res://Models/Hats/9.tscn", "res://Models/Hats/8.tscn", "res://Models/Hats/7.tscn", "res://Models/Hats/6.tscn"] -scripts=["InputEventMouseMotion", "InputEventJoypadMotion", "GeometryInstance3D", "ENetPacketPeer", "ENetMultiplayerPeer", "@GlobalScope", "res://Scripts/Hat1.gd", "res://Scripts/chicken.gd", "PackedScene", "res://Scripts/world.gd"] +scripts=["res://Scripts/Player.gd", "res://Scripts/world.gd", "InputEventMouseMotion", "InputEventJoypadMotion", "GeometryInstance3D", "ENetPacketPeer", "ENetMultiplayerPeer", "@GlobalScope", "res://Scripts/Hat1.gd", "res://Scripts/chicken.gd"] [linked_properties] diff --git a/.godot/editor/script_editor_cache.cfg b/.godot/editor/script_editor_cache.cfg index f664a5f..763c9db 100644 --- a/.godot/editor/script_editor_cache.cfg +++ b/.godot/editor/script_editor_cache.cfg @@ -3,11 +3,11 @@ state={ "bookmarks": PackedInt32Array(), "breakpoints": PackedInt32Array(), -"column": 5, +"column": 0, "folded_lines": Array[int]([]), "h_scroll_position": 0, -"row": 132, -"scroll_position": 92.0, +"row": 78, +"scroll_position": 70.0, "selection": false, "syntax_highlighter": "GDScript" } @@ -17,11 +17,11 @@ state={ state={ "bookmarks": PackedInt32Array(), "breakpoints": PackedInt32Array(), -"column": 45, +"column": 20, "folded_lines": Array[int]([]), "h_scroll_position": 0, -"row": 87, -"scroll_position": 29.75, +"row": 24, +"scroll_position": 0.0, "selection": false, "syntax_highlighter": "GDScript" } diff --git a/.godot/editor/world.tscn-editstate-0271e18ecf37a36b455ad0b215994549.cfg b/.godot/editor/world.tscn-editstate-0271e18ecf37a36b455ad0b215994549.cfg index 9dd50d8..50983ca 100644 --- a/.godot/editor/world.tscn-editstate-0271e18ecf37a36b455ad0b215994549.cfg +++ b/.godot/editor/world.tscn-editstate-0271e18ecf37a36b455ad0b215994549.cfg @@ -8,7 +8,7 @@ Anim={ "grid_snap_active": false, "grid_step": Vector2(8, 8), "grid_visibility": 1, -"ofs": Vector2(39.1031, 90.431), +"ofs": Vector2(-83.0345, 19.0172), "primary_grid_steps": 8, "show_edit_locks": true, "show_guides": true, @@ -173,4 +173,4 @@ Anim={ "zfar": 4000.01, "znear": 0.05 } -selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17665/@Control@697/@Panel@698/@VBoxContainer@706/@HSplitContainer@709/@HSplitContainer@717/@HSplitContainer@725/@VBoxContainer@726/@VSplitContainer@728/@VSplitContainer@754/@VBoxContainer@755/@PanelContainer@800/MainScreen/@CanvasItemEditor@10090/@VSplitContainer@9915/@HSplitContainer@9917/@HSplitContainer@9919/@Control@9920/@SubViewportContainer@9921/@SubViewport@9922/World")]) +selected_nodes=Array[NodePath]([]) diff --git a/.godot/editor/world.tscn-folding-0271e18ecf37a36b455ad0b215994549.cfg b/.godot/editor/world.tscn-folding-0271e18ecf37a36b455ad0b215994549.cfg index 5a51ca0..3a8024f 100644 --- a/.godot/editor/world.tscn-folding-0271e18ecf37a36b455ad0b215994549.cfg +++ b/.godot/editor/world.tscn-folding-0271e18ecf37a36b455ad0b215994549.cfg @@ -2,4 +2,4 @@ node_unfolds=[NodePath("environment"), PackedStringArray("Transform"), NodePath("DirectionalLight3D"), PackedStringArray("Shadow", "Light"), NodePath("CanvasLayer/MainMenu"), PackedStringArray("Theme Overrides", "Theme Overrides/styles"), NodePath("CanvasLayer/MainMenu/MarginContainer"), PackedStringArray("Theme Overrides", "Theme Overrides/constants"), NodePath("CanvasLayer/MainMenu/MarginContainer/VBoxContainer"), PackedStringArray("Theme Overrides", "Theme Overrides/constants"), NodePath("CanvasLayer/HUD"), PackedStringArray("Mouse"), NodePath("CanvasLayer/HUD/HealthBar"), PackedStringArray("Theme Overrides", "Theme Overrides/styles", "theme_override_styles/fill", "theme_override_styles/background"), NodePath("CanvasLayer/PauseMenu"), PackedStringArray("Layout"), NodePath("CanvasLayer/PauseMenu/MarginContainer/VBoxContainer"), PackedStringArray("Theme Overrides", "Theme Overrides/constants"), NodePath("MultiplayerSpawner"), PackedStringArray("_spawnable_scene_count_array")] resource_unfolds=["res://Scenes/world.tscn::StyleBoxFlat_cdng2", PackedStringArray(), "res://Scenes/world.tscn::StyleBoxFlat_ufa2v", PackedStringArray()] -nodes_folded=[NodePath("CanvasLayer/MainMenu"), NodePath("CanvasLayer/MainMenu/MarginContainer"), NodePath("CanvasLayer/HUD")] +nodes_folded=[NodePath("CanvasLayer"), NodePath("CanvasLayer/HUD")] diff --git a/.godot/mono/metadata/ide_messaging_meta.txt b/.godot/mono/metadata/ide_messaging_meta.txt deleted file mode 100644 index 9637c99..0000000 --- a/.godot/mono/metadata/ide_messaging_meta.txt +++ /dev/null @@ -1,2 +0,0 @@ -44039 -/home/nc543/Documents/Godot/Versions/Godot_v4.1.3-stable_mono_linux_x86_64/Godot_v4.1.3-stable_mono_linux.x86_64 diff --git a/.godot/uid_cache.bin b/.godot/uid_cache.bin index 11676fb..644fe0a 100644 Binary files a/.godot/uid_cache.bin and b/.godot/uid_cache.bin differ diff --git a/Scenes/world.tscn b/Scenes/world.tscn index 0d5b806..26a86cb 100644 --- a/Scenes/world.tscn +++ b/Scenes/world.tscn @@ -162,7 +162,7 @@ offset_bottom = 103.0 grow_horizontal = 2 grow_vertical = 2 placeholder_text = "Enter Username" -max_length = 21 +max_length = 50 [node name="Button" type="Button" parent="CanvasLayer/MainMenu/MarginContainer/VBoxContainer/BaseMenu"] layout_mode = 1 diff --git a/Scripts/Player.gd b/Scripts/Player.gd index 57b7cad..8afcd65 100644 --- a/Scripts/Player.gd +++ b/Scripts/Player.gd @@ -14,6 +14,7 @@ const JUMP_VELOCITY: float = 10 @onready var syncronizer = $MultiplayerSynchronizer @onready var gunshot = $Camera3D/gun/Gunshot @onready var listener = $AudioListener3D +@onready var pauseMenu = get_node("/root/World/CanvasLayer/PauseMenu") @export var username: String = "Chicken" @export var hat: int = 0 @@ -22,6 +23,7 @@ const JUMP_VELOCITY: float = 10 var syncTimer: int = 0 var hattified: bool = false +var paused: bool = false # Get the gravity from the project settings to be synced with RigidBody nodes. var gravity: float = 20 @@ -47,7 +49,9 @@ func _enter_tree(): set_multiplayer_authority(str(name).to_int()) func _unhandled_input(event): - if not is_multiplayer_authority(): return + if not is_multiplayer_authority() or paused: return + if Input.is_action_just_pressed("quit"): + pause() if event is InputEventMouseMotion: rotate_y(-event.relative.x * lookSensitivity) camera.rotate_x(-event.relative.y * lookSensitivity) @@ -74,7 +78,7 @@ func shoot(): flash.emitting = true func _physics_process(delta): - if not is_multiplayer_authority(): return + if not is_multiplayer_authority() or paused: return # Add the gravity. if not is_on_floor(): velocity.y -= gravity * delta @@ -130,4 +134,8 @@ func makeHat(): result.hideMesh() func pause(): - pass + if paused: + pauseMenu.hide() + else: + pauseMenu.show() + paused = !paused