generated from krampus/template-godot4
	Compare commits
	
		
			No commits in common. "5b0305df9638aca3ce8c08acff3e30fd31422afa" and "7c3a2002b7e5a99470c4e784eaf8825ca53b8698" have entirely different histories.
		
	
	
		
			5b0305df96
			...
			7c3a2002b7
		
	
		
							
								
								
									
										
											BIN
										
									
								
								asset_dev/balls/powerball/fireball.blend
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								asset_dev/balls/powerball/fireball.blend
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							| @ -25,7 +25,7 @@ hinting=1 | ||||
| subpixel_positioning=1 | ||||
| oversampling=0.0 | ||||
| Fallbacks=null | ||||
| fallbacks=[Resource("res://assets/fonts/promptfont/promptfont.otf")] | ||||
| fallbacks=[] | ||||
| Compress=null | ||||
| compress=true | ||||
| preload=[] | ||||
|  | ||||
| @ -25,7 +25,7 @@ hinting=1 | ||||
| subpixel_positioning=1 | ||||
| oversampling=0.0 | ||||
| Fallbacks=null | ||||
| fallbacks=[Resource("res://assets/fonts/promptfont/promptfont.otf")] | ||||
| fallbacks=[] | ||||
| Compress=null | ||||
| compress=true | ||||
| preload=[] | ||||
|  | ||||
							
								
								
									
										
											BIN
										
									
								
								assets/logo/subtitle.png
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/logo/subtitle.png
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							| @ -1,34 +0,0 @@ | ||||
| [remap] | ||||
| 
 | ||||
| importer="texture" | ||||
| type="CompressedTexture2D" | ||||
| uid="uid://clesl8lljs6of" | ||||
| path="res://.godot/imported/subtitle.png-c337aafe5885358fb0ffc36ef2953f5b.ctex" | ||||
| metadata={ | ||||
| "vram_texture": false | ||||
| } | ||||
| 
 | ||||
| [deps] | ||||
| 
 | ||||
| source_file="res://assets/logo/subtitle.png" | ||||
| dest_files=["res://.godot/imported/subtitle.png-c337aafe5885358fb0ffc36ef2953f5b.ctex"] | ||||
| 
 | ||||
| [params] | ||||
| 
 | ||||
| compress/mode=0 | ||||
| compress/high_quality=false | ||||
| compress/lossy_quality=0.7 | ||||
| compress/hdr_compression=1 | ||||
| compress/normal_map=0 | ||||
| compress/channel_pack=0 | ||||
| mipmaps/generate=true | ||||
| mipmaps/limit=-1 | ||||
| roughness/mode=0 | ||||
| roughness/src_normal="" | ||||
| process/fix_alpha_border=true | ||||
| process/premult_alpha=false | ||||
| process/normal_map_invert_y=false | ||||
| process/hdr_as_srgb=false | ||||
| process/hdr_clamp_exposure=false | ||||
| process/size_limit=0 | ||||
| detect_3d/compress_to=1 | ||||
							
								
								
									
										
											BIN
										
									
								
								assets/logo/title.png
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/logo/title.png
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							| @ -1,34 +0,0 @@ | ||||
| [remap] | ||||
| 
 | ||||
| importer="texture" | ||||
| type="CompressedTexture2D" | ||||
| uid="uid://880x5n8j3b5l" | ||||
| path="res://.godot/imported/title.png-774088d389fa729175f3ae1a98440e19.ctex" | ||||
| metadata={ | ||||
| "vram_texture": false | ||||
| } | ||||
| 
 | ||||
| [deps] | ||||
| 
 | ||||
| source_file="res://assets/logo/title.png" | ||||
| dest_files=["res://.godot/imported/title.png-774088d389fa729175f3ae1a98440e19.ctex"] | ||||
| 
 | ||||
| [params] | ||||
| 
 | ||||
| compress/mode=0 | ||||
| compress/high_quality=false | ||||
| compress/lossy_quality=0.7 | ||||
| compress/hdr_compression=1 | ||||
| compress/normal_map=0 | ||||
| compress/channel_pack=0 | ||||
| mipmaps/generate=true | ||||
| mipmaps/limit=-1 | ||||
| roughness/mode=0 | ||||
| roughness/src_normal="" | ||||
| process/fix_alpha_border=true | ||||
| process/premult_alpha=false | ||||
| process/normal_map_invert_y=false | ||||
| process/hdr_as_srgb=false | ||||
| process/hdr_clamp_exposure=false | ||||
| process/size_limit=0 | ||||
| detect_3d/compress_to=1 | ||||
							
								
								
									
										
											BIN
										
									
								
								assets/logo/title_full.png
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/logo/title_full.png
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							| @ -1,34 +0,0 @@ | ||||
| [remap] | ||||
| 
 | ||||
| importer="texture" | ||||
| type="CompressedTexture2D" | ||||
| uid="uid://dgoie75rgayew" | ||||
| path="res://.godot/imported/title_full.png-ed2553ec8464e1717dc08430fa286164.ctex" | ||||
| metadata={ | ||||
| "vram_texture": false | ||||
| } | ||||
| 
 | ||||
| [deps] | ||||
| 
 | ||||
| source_file="res://assets/logo/title_full.png" | ||||
| dest_files=["res://.godot/imported/title_full.png-ed2553ec8464e1717dc08430fa286164.ctex"] | ||||
| 
 | ||||
| [params] | ||||
| 
 | ||||
| compress/mode=0 | ||||
| compress/high_quality=false | ||||
| compress/lossy_quality=0.7 | ||||
| compress/hdr_compression=1 | ||||
| compress/normal_map=0 | ||||
| compress/channel_pack=0 | ||||
| mipmaps/generate=true | ||||
| mipmaps/limit=-1 | ||||
| roughness/mode=0 | ||||
| roughness/src_normal="" | ||||
| process/fix_alpha_border=true | ||||
| process/premult_alpha=false | ||||
| process/normal_map_invert_y=false | ||||
| process/hdr_as_srgb=false | ||||
| process/hdr_clamp_exposure=false | ||||
| process/size_limit=0 | ||||
| detect_3d/compress_to=1 | ||||
| @ -15,17 +15,7 @@ | ||||
| 	"nodes":[ | ||||
| 		{ | ||||
| 			"mesh":0, | ||||
| 			"name":"Fireball", | ||||
| 			"scale":[ | ||||
| 				0.3999999761581421, | ||||
| 				0.800000011920929, | ||||
| 				0.3999999761581421 | ||||
| 			], | ||||
| 			"translation":[ | ||||
| 				0, | ||||
| 				-0.019999999552965164, | ||||
| 				0 | ||||
| 			] | ||||
| 			"name":"Fireball" | ||||
| 		} | ||||
| 	], | ||||
| 	"meshes":[ | ||||
|  | ||||
| @ -3,39 +3,13 @@ UI_UNSET,unset | ||||
| UI_LISTEN,listening... | ||||
| UI_CANCEL,Cancel | ||||
| UI_ACCEPT,Accept | ||||
| UI_START,Start! | ||||
| UI_ON,On | ||||
| UI_OFF,Off | ||||
| UI_BACK,"⏎ Back" | ||||
| UI_LOCKED,Locked | ||||
| UI_GOAL,Goal! | ||||
| , | ||||
| TITLE_START,"- Press Start -" | ||||
| TITLE_SINGLE_PLAYER,"Single Player" | ||||
| TITLE_STORY,"World Tour" | ||||
| TITLE_SERIES,Series | ||||
| TITLE_ROGUELIKE,Campaign | ||||
| TITLE_PRACTICE,Practice | ||||
| TITLE_MULTI_PLAYER,Multiplayer | ||||
| TITLE_DEATHMATCH,"Real GFOLF" | ||||
| TITLE_VS_SERIES,"Death Run" | ||||
| TITLE_BATTLE_ROYALE,"GFOLF Royale" | ||||
| TITLE_LOCAL_MULTI,"Local Multiplayer" | ||||
| TITLE_NETWORK_MULTI,"Online Multiplayer" | ||||
| TITLE_PROFILE,Profile | ||||
| TITLE_CREDITS,Credits | ||||
| , | ||||
| DM_HEADING,"Real GFOLF - Local Setup" | ||||
| DM_MAP,"Select a Map" | ||||
| DM_PLAYERS,Gfolfers | ||||
| DM_ADD_PLAYER,"Add a Gfolfer" | ||||
| DM_NAME_PLACEHOLDER,"Enter a name" | ||||
| , | ||||
| PAUSE_HEADING,Paused | ||||
| PAUSE_RESUME,Resume | ||||
| PAUSE_SETTINGS,Settings | ||||
| PAUSE_END,"End Game" | ||||
| PAUSE_END_MSG,"End the current game?" | ||||
| PAUSE_QUIT,Quit | ||||
| PAUSE_QUIT_MSG,"Quit to desktop?" | ||||
| , | ||||
| @ -133,5 +107,3 @@ BALL_PLASMA,Plasma | ||||
| BALL_BRICK,Brick | ||||
| BALL_BEACH,"Beach Ball" | ||||
| BALL_POWER,Powerball | ||||
| , | ||||
| MAP_DEBUG,"Debug Island" | ||||
|  | ||||
| 
 | 
| @ -3,19 +3,20 @@ | ||||
| importer="texture" | ||||
| type="CompressedTexture2D" | ||||
| uid="uid://dr7so4lvqiftc" | ||||
| path="res://.godot/imported/grass_fairway.png-c6748aa9af191257973d3e582b17c659.ctex" | ||||
| path.s3tc="res://.godot/imported/grass_fairway.png-c6748aa9af191257973d3e582b17c659.s3tc.ctex" | ||||
| metadata={ | ||||
| "vram_texture": false | ||||
| "imported_formats": ["s3tc_bptc"], | ||||
| "vram_texture": true | ||||
| } | ||||
| 
 | ||||
| [deps] | ||||
| 
 | ||||
| source_file="res://assets/textures/grass_fairway/grass_fairway.png" | ||||
| dest_files=["res://.godot/imported/grass_fairway.png-c6748aa9af191257973d3e582b17c659.ctex"] | ||||
| dest_files=["res://.godot/imported/grass_fairway.png-c6748aa9af191257973d3e582b17c659.s3tc.ctex"] | ||||
| 
 | ||||
| [params] | ||||
| 
 | ||||
| compress/mode=0 | ||||
| compress/mode=2 | ||||
| compress/high_quality=false | ||||
| compress/lossy_quality=0.7 | ||||
| compress/hdr_compression=1 | ||||
|  | ||||
| @ -1,11 +0,0 @@ | ||||
| [gd_resource type="Resource" script_class="Level" load_steps=4 format=3 uid="uid://chewry1b1a28j"] | ||||
| 
 | ||||
| [ext_resource type="Texture2D" uid="uid://dlqet1c5a7j7k" path="res://levels/debug_level/preview.jpg" id="1_1ewcj"] | ||||
| [ext_resource type="PackedScene" uid="uid://bm2o3mex10v11" path="res://levels/debug_level/debug_level.tscn" id="2_eu01o"] | ||||
| [ext_resource type="Script" path="res://src/world/level/level.gd" id="3_83327"] | ||||
| 
 | ||||
| [resource] | ||||
| script = ExtResource("3_83327") | ||||
| scene = ExtResource("2_eu01o") | ||||
| level_name = "MAP_DEBUG" | ||||
| preview = ExtResource("1_1ewcj") | ||||
| @ -1,4 +1,4 @@ | ||||
| [gd_scene load_steps=68 format=3 uid="uid://bm2o3mex10v11"] | ||||
| [gd_scene load_steps=67 format=3 uid="uid://bm2o3mex10v11"] | ||||
| 
 | ||||
| [ext_resource type="Terrain3DAssets" uid="uid://cwl34gstabgrx" path="res://levels/debug_level/terrain_assets.res" id="1_5smdk"] | ||||
| [ext_resource type="Shader" path="res://src/shaders/psx_water.gdshader" id="6_0efu4"] | ||||
| @ -13,7 +13,6 @@ | ||||
| [ext_resource type="PackedScene" uid="uid://di7aql54lksn7" path="res://src/props/scenery/trees/palm_tree/palm_tree.tscn" id="12_sswxf"] | ||||
| [ext_resource type="PackedScene" uid="uid://cjne55s85x7jy" path="res://src/items/extra_ball/brick_item.tscn" id="12_tj0lh"] | ||||
| [ext_resource type="PackedScene" uid="uid://c7l58wuuahn7w" path="res://src/props/flag/flag.tscn" id="13_6jtao"] | ||||
| [ext_resource type="PackedScene" uid="uid://brh7twsjw2c5f" path="res://src/items/extra_ball/power_ball_item.tscn" id="13_enoia"] | ||||
| [ext_resource type="PackedScene" uid="uid://comd88yp45mnb" path="res://src/items/item/item.tscn" id="13_ydvlu"] | ||||
| [ext_resource type="PackedScene" uid="uid://cl0goj38u7r72" path="res://src/props/scenery/beach/sailboat.tscn" id="14_6reiy"] | ||||
| [ext_resource type="PackedScene" uid="uid://mcuhy71v6ggu" path="res://src/items/extra_ball/plasma_ball_item.tscn" id="15_ir4ss"] | ||||
| @ -365,7 +364,7 @@ shape = SubResource("BoxShape3D_x3wvm") | ||||
| transform = Transform3D(-0.74629, 0, -0.665621, 0, 1, 0, 0.665621, 0, -0.74629, 381.024, -0.5, 224.968) | ||||
| 
 | ||||
| [node name="ItemSpawner" type="Marker3D" parent="Course/WaterTable/Sailboat"] | ||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, 5) | ||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, 5.3) | ||||
| script = ExtResource("8_5kaye") | ||||
| item = ExtResource("8_3jmdx") | ||||
| amount = -1 | ||||
| @ -374,7 +373,6 @@ spawn_turns = 1 | ||||
| 
 | ||||
| [node name="Flag" parent="Course" instance=ExtResource("13_6jtao")] | ||||
| transform = Transform3D(-0.777146, 0, -0.629321, 0, 1, 0, 0.629321, 0, -0.777146, 540, 4, 452) | ||||
| visible = false | ||||
| 
 | ||||
| [node name="TestSpawners" type="Node3D" parent="Course"] | ||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 228.164, 4, 274.211) | ||||
| @ -415,16 +413,8 @@ amount = 5 | ||||
| spawn_on_ready = true | ||||
| spawn_turns = 1 | ||||
| 
 | ||||
| [node name="PowerBallSpawner" type="Marker3D" parent="Course/TestSpawners"] | ||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 11.9467, 1.1, 7.60959) | ||||
| script = ExtResource("8_5kaye") | ||||
| item = ExtResource("13_enoia") | ||||
| amount = 5 | ||||
| spawn_on_ready = true | ||||
| spawn_turns = 1 | ||||
| 
 | ||||
| [node name="HealthSpawner" type="Marker3D" parent="Course/TestSpawners"] | ||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -21.0809, 1, 17.8327) | ||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 13.651, 1, 7.92) | ||||
| script = ExtResource("8_5kaye") | ||||
| item = ExtResource("12_jiuxh") | ||||
| amount = 25 | ||||
|  | ||||
							
								
								
									
										
											BIN
										
									
								
								levels/debug_level/preview.jpg
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								levels/debug_level/preview.jpg
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							| @ -1,34 +0,0 @@ | ||||
| [remap] | ||||
| 
 | ||||
| importer="texture" | ||||
| type="CompressedTexture2D" | ||||
| uid="uid://dlqet1c5a7j7k" | ||||
| path="res://.godot/imported/preview.jpg-00ef6b4680c54da42f46dbea949541d6.ctex" | ||||
| metadata={ | ||||
| "vram_texture": false | ||||
| } | ||||
| 
 | ||||
| [deps] | ||||
| 
 | ||||
| source_file="res://levels/debug_level/preview.jpg" | ||||
| dest_files=["res://.godot/imported/preview.jpg-00ef6b4680c54da42f46dbea949541d6.ctex"] | ||||
| 
 | ||||
| [params] | ||||
| 
 | ||||
| compress/mode=0 | ||||
| compress/high_quality=false | ||||
| compress/lossy_quality=0.7 | ||||
| compress/hdr_compression=1 | ||||
| compress/normal_map=0 | ||||
| compress/channel_pack=0 | ||||
| mipmaps/generate=true | ||||
| mipmaps/limit=-1 | ||||
| roughness/mode=0 | ||||
| roughness/src_normal="" | ||||
| process/fix_alpha_border=true | ||||
| process/premult_alpha=false | ||||
| process/normal_map_invert_y=false | ||||
| process/hdr_as_srgb=false | ||||
| process/hdr_clamp_exposure=false | ||||
| process/size_limit=0 | ||||
| detect_3d/compress_to=1 | ||||
| @ -19,10 +19,7 @@ run/max_fps=60 | ||||
| 
 | ||||
| [autoload] | ||||
| 
 | ||||
| GameRuntime="*res://src/game/game_runtime.gd" | ||||
| ClubCatalog="*res://src/equipment/clubs/club_catalog.tscn" | ||||
| CharacterCatalog="*res://src/characters/player_characters/character/character_catalog.tscn" | ||||
| LevelCatalog="*res://src/world/level/level_catalog.tscn" | ||||
| GameSettings="*res://src/game/game_settings.gd" | ||||
| 
 | ||||
| [debug] | ||||
| @ -81,13 +78,6 @@ theme/custom="res://src/ui/main_theme.tres" | ||||
| 
 | ||||
| [input] | ||||
| 
 | ||||
| ui_start={ | ||||
| "deadzone": 0.5, | ||||
| "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194309,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) | ||||
| , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":6,"pressure":0.0,"pressed":true,"script":null) | ||||
| , Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194310,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) | ||||
| ] | ||||
| } | ||||
| camera_forward={ | ||||
| "deadzone": 0.5, | ||||
| "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null) | ||||
|  | ||||
| @ -1,2 +1,2 @@ | ||||
| gdtoolkit>=4.3.3,<4.4 | ||||
| gdtoolkit>=4.2.2,<4.3 | ||||
| setuptools>=69.5.1,<69.6 | ||||
|  | ||||
| @ -1,13 +0,0 @@ | ||||
| class_name Character extends Resource | ||||
| ## Container for a playable character scene & associated data. | ||||
| 
 | ||||
| ## Scene file of this character's controller. | ||||
| @export var controller_scene: PackedScene | ||||
| 
 | ||||
| ## Human-readable name of the character (or corresponding i18n key) | ||||
| @export var name: String | ||||
| 
 | ||||
| ## Global typesafe accessor for character catalog | ||||
| static var catalog: CharacterCatalogType: | ||||
| 	get: | ||||
| 		return CharacterCatalog | ||||
| @ -1,4 +0,0 @@ | ||||
| class_name CharacterCatalogType extends Node | ||||
| ## Provides access to levels. | ||||
| 
 | ||||
| @export var characters: Array[Character] | ||||
| @ -1,9 +0,0 @@ | ||||
| [gd_scene load_steps=4 format=3 uid="uid://c3at6645rg8i3"] | ||||
| 
 | ||||
| [ext_resource type="Script" path="res://src/characters/player_characters/character/character_catalog.gd" id="1_lnhxq"] | ||||
| [ext_resource type="Script" path="res://src/characters/player_characters/character/character.gd" id="2_ct428"] | ||||
| [ext_resource type="Resource" uid="uid://dy2f0k6edrixe" path="res://src/characters/player_characters/gfolf_girl/debug_girl.tres" id="3_djrp2"] | ||||
| 
 | ||||
| [node name="CharacterCatalog" type="Node"] | ||||
| script = ExtResource("1_lnhxq") | ||||
| characters = Array[ExtResource("2_ct428")]([ExtResource("3_djrp2")]) | ||||
| @ -1,9 +0,0 @@ | ||||
| [gd_resource type="Resource" script_class="Character" load_steps=3 format=3 uid="uid://dy2f0k6edrixe"] | ||||
| 
 | ||||
| [ext_resource type="PackedScene" uid="uid://1s3gywmoi20e" path="res://src/characters/player_characters/gfolf_girl/gfolf_girl.tscn" id="1_m8n4f"] | ||||
| [ext_resource type="Script" path="res://src/characters/player_characters/character/character.gd" id="2_rx8x8"] | ||||
| 
 | ||||
| [resource] | ||||
| script = ExtResource("2_rx8x8") | ||||
| controller_scene = ExtResource("1_m8n4f") | ||||
| name = "Debug Girl" | ||||
| @ -7,7 +7,7 @@ | ||||
| [ext_resource type="PackedScene" uid="uid://dd2nxbfssd4hh" path="res://assets/models/balls/powerball/fireball.gltf" id="5_i8vmm"] | ||||
| [ext_resource type="AudioStream" uid="uid://tqr7u7vb2r0f" path="res://assets/sound/sfx/ball/effects/fireball.wav" id="6_uwolu"] | ||||
| 
 | ||||
| [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_fcniu"] | ||||
| [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_c4cm7"] | ||||
| albedo_color = Color(2, 0.266, 0.266, 1) | ||||
| albedo_texture = ExtResource("2_a2gtg") | ||||
| albedo_texture_force_srgb = true | ||||
| @ -21,7 +21,7 @@ uv1_scale = Vector3(3, 1.5, 3) | ||||
| texture_filter = 4 | ||||
| 
 | ||||
| [sub_resource type="SphereMesh" id="SphereMesh_0b0i7"] | ||||
| material = SubResource("StandardMaterial3D_fcniu") | ||||
| material = SubResource("StandardMaterial3D_c4cm7") | ||||
| radius = 0.05 | ||||
| height = 0.1 | ||||
| radial_segments = 6 | ||||
| @ -31,7 +31,7 @@ rings = 6 | ||||
| offsets = PackedFloat32Array(0.291939, 1) | ||||
| colors = PackedColorArray(1, 1, 1, 1, 1, 1, 0, 1) | ||||
| 
 | ||||
| [sub_resource type="GradientTexture2D" id="GradientTexture2D_ny4ye"] | ||||
| [sub_resource type="GradientTexture2D" id="GradientTexture2D_sr8jb"] | ||||
| gradient = SubResource("Gradient_b68qa") | ||||
| fill = 1 | ||||
| fill_from = Vector2(0.5, 0.5) | ||||
| @ -43,7 +43,7 @@ cull_mode = 2 | ||||
| shading_mode = 0 | ||||
| vertex_color_use_as_albedo = true | ||||
| albedo_color = Color(2, 1.98431, 1.6, 0.156863) | ||||
| albedo_texture = SubResource("GradientTexture2D_ny4ye") | ||||
| albedo_texture = SubResource("GradientTexture2D_sr8jb") | ||||
| 
 | ||||
| [sub_resource type="Animation" id="Animation_5t74j"] | ||||
| resource_name = "flicker" | ||||
| @ -56,10 +56,10 @@ tracks/0/path = NodePath("FireballScaleRoot:scale") | ||||
| tracks/0/interp = 1 | ||||
| tracks/0/loop_wrap = true | ||||
| tracks/0/keys = { | ||||
| "times": PackedFloat32Array(0.00610052, 0.110417, 0.206101, 0.310417, 0.40305, 0.510417, 0.60305, 0.710417, 0.80305, 0.910417, 1, 1.11042, 1.2, 1.31042, 1.4, 1.51042, 1.6, 1.71042, 1.8, 1.9), | ||||
| "times": PackedFloat32Array(0.00610052, 0.1, 0.206101, 0.3, 0.40305, 0.5, 0.60305, 0.7, 0.80305, 0.9, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9), | ||||
| "transitions": PackedFloat32Array(0.618, 1, 0.618, 1, 0.618, 1, 0.618, 1, 0.618, 1, 0.618, 1, 0.618, 1, 0.618, 1, 0.618, 1, 0.618, 1), | ||||
| "update": 0, | ||||
| "values": [Vector3(1, 1, 1), Vector3(1, 1.03, 1), Vector3(1, 1, 1), Vector3(1, 1.03, 1), Vector3(1, 1, 1), Vector3(1, 1.03, 1), Vector3(1, 1, 1), Vector3(1, 1.03, 1), Vector3(1, 1, 1), Vector3(1, 1.03, 1), Vector3(1, 1, 1), Vector3(1, 1.03, 1), Vector3(1, 1, 1), Vector3(1, 1.03, 1), Vector3(1, 1, 1), Vector3(1, 1.03, 1), Vector3(1, 1, 1), Vector3(1, 1.03, 1), Vector3(1, 1, 1), Vector3(1, 1.03, 1)] | ||||
| "values": [Vector3(1, 1, 1), Vector3(1, 1.2, 1), Vector3(1, 1, 1), Vector3(1, 1.2, 1), Vector3(1, 1, 1), Vector3(1, 1.2, 1), Vector3(1, 1, 1), Vector3(1, 1.2, 1), Vector3(1, 1, 1), Vector3(1, 1.2, 1), Vector3(1, 1, 1), Vector3(1, 1.2, 1), Vector3(1, 1, 1), Vector3(1, 1.2, 1), Vector3(1, 1, 1), Vector3(1, 1.2, 1), Vector3(1, 1, 1), Vector3(1, 1.2, 1), Vector3(1, 1, 1), Vector3(1, 1.2, 1)] | ||||
| } | ||||
| tracks/1/type = "value" | ||||
| tracks/1/imported = false | ||||
| @ -397,7 +397,7 @@ visible = false | ||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.1, 0) | ||||
| 
 | ||||
| [node name="fireball" parent="BallMesh/FireballPivot/FireballScaleRoot" index="0" instance=ExtResource("5_i8vmm")] | ||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.17, 0) | ||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.2, 0) | ||||
| 
 | ||||
| [node name="Fireball" parent="BallMesh/FireballPivot/FireballScaleRoot/fireball" index="0"] | ||||
| surface_material_override/0 = SubResource("StandardMaterial3D_aqmuo") | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| class_name Game extends Node | ||||
| ## Wrapper for the game application | ||||
| 
 | ||||
| @export var start_scene: String = "res://src/ui/menus/title_screen/title_screen.tscn" | ||||
| @export var start_scene: String = "res://src/world/world.tscn" | ||||
| 
 | ||||
| var _loading_resources := {} | ||||
| 
 | ||||
| @ -14,9 +14,7 @@ var _loading_resources := {} | ||||
| static var group := "GameGroup"  # hey i'm group | ||||
| 
 | ||||
| ## Typesafe accessor for GameSettings singleton | ||||
| static var settings: GameSettingsType: | ||||
| 	get: | ||||
| 		return GameSettings | ||||
| static var settings := GameSettings as GameSettingsType | ||||
| 
 | ||||
| 
 | ||||
| class Promise: | ||||
| @ -104,3 +102,12 @@ func _process(_delta: float) -> void: | ||||
| 
 | ||||
| 	if not _loading_resources and loading_screen.visible: | ||||
| 		loader_transition.play("fade_out") | ||||
| 
 | ||||
| 
 | ||||
| func _notification(what: int) -> void: | ||||
| 	if what == NOTIFICATION_WM_CLOSE_REQUEST: | ||||
| 		# Handle close request here | ||||
| 		# TODO: save? | ||||
| 		get_tree().quit() | ||||
| 	elif what == NOTIFICATION_CRASH: | ||||
| 		print_debug("CRASHING!") | ||||
|  | ||||
| @ -1,11 +0,0 @@ | ||||
| class_name GameRuntimeType extends Node | ||||
| ## Autoloaded runtime manager | ||||
| 
 | ||||
| 
 | ||||
| func _notification(what: int) -> void: | ||||
| 	if what == NOTIFICATION_WM_CLOSE_REQUEST: | ||||
| 		# Handle close request here | ||||
| 		# TODO: save? | ||||
| 		get_tree().quit() | ||||
| 	elif what == NOTIFICATION_CRASH: | ||||
| 		print_debug("CRASHING!") | ||||
| @ -1,253 +0,0 @@ | ||||
| [gd_scene load_steps=20 format=3 uid="uid://brh7twsjw2c5f"] | ||||
| 
 | ||||
| [ext_resource type="PackedScene" uid="uid://comd88yp45mnb" path="res://src/items/item/item.tscn" id="1_v5gka"] | ||||
| [ext_resource type="Script" path="res://src/items/extra_ball/extra_ball.gd" id="2_wxxbc"] | ||||
| [ext_resource type="Shader" path="res://src/shaders/frosted_glass.gdshader" id="3_jybe0"] | ||||
| [ext_resource type="Texture2D" uid="uid://ckhiq6rfjv63u" path="res://assets/textures/gfolfball/gfolfball.png" id="3_y1s2r"] | ||||
| [ext_resource type="Texture2D" uid="uid://c2p2in2p7mjyo" path="res://assets/materials/crystal_noise_normal_map.tres" id="4_ki8rs"] | ||||
| [ext_resource type="Texture2D" uid="uid://cx33n4h5mfcdb" path="res://assets/materials/crystal_noise_map.tres" id="5_3u0nl"] | ||||
| [ext_resource type="PackedScene" uid="uid://dd2nxbfssd4hh" path="res://assets/models/balls/powerball/fireball.gltf" id="5_gi2ty"] | ||||
| 
 | ||||
| [sub_resource type="ShaderMaterial" id="ShaderMaterial_p5hhx"] | ||||
| render_priority = 0 | ||||
| shader = ExtResource("3_jybe0") | ||||
| shader_parameter/albedo = Color(0.5146, 0.62, 0.62, 0.0392157) | ||||
| shader_parameter/roughness = 0.3 | ||||
| shader_parameter/roughness_texture = ExtResource("5_3u0nl") | ||||
| shader_parameter/refraction = 0.0100008 | ||||
| shader_parameter/refraction_texture_channel = Vector4(1, 0, 0, 0) | ||||
| shader_parameter/texture_refraction = ExtResource("5_3u0nl") | ||||
| shader_parameter/normal_strength = 0.400001 | ||||
| shader_parameter/normal_map = ExtResource("4_ki8rs") | ||||
| shader_parameter/subsurface_scattering_strength = 1.0 | ||||
| shader_parameter/texture_subsurface_scattering = ExtResource("5_3u0nl") | ||||
| shader_parameter/edge_color = Color(0, 1, 1.2, 1) | ||||
| shader_parameter/surface_contribution = 0.2 | ||||
| shader_parameter/specular_contribution = 0.5 | ||||
| shader_parameter/refraction_contribution = 10.0 | ||||
| shader_parameter/alpha = 1.0 | ||||
| shader_parameter/uv1_scale = Vector3(1, 1, 1) | ||||
| shader_parameter/uv1_offset = Vector3(0, 0, 0) | ||||
| 
 | ||||
| [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_0d52l"] | ||||
| shading_mode = 0 | ||||
| albedo_color = Color(2, 0.266, 0.266, 1) | ||||
| albedo_texture = ExtResource("3_y1s2r") | ||||
| albedo_texture_force_srgb = true | ||||
| uv1_scale = Vector3(3, 1.5, 3) | ||||
| texture_filter = 4 | ||||
| 
 | ||||
| [sub_resource type="SphereMesh" id="SphereMesh_qvrp7"] | ||||
| material = SubResource("StandardMaterial3D_0d52l") | ||||
| radius = 0.05 | ||||
| height = 0.1 | ||||
| radial_segments = 6 | ||||
| rings = 6 | ||||
| 
 | ||||
| [sub_resource type="Gradient" id="Gradient_f8tdf"] | ||||
| offsets = PackedFloat32Array(0.291939, 1) | ||||
| colors = PackedColorArray(1, 1, 1, 1, 1, 1, 0, 1) | ||||
| 
 | ||||
| [sub_resource type="GradientTexture2D" id="GradientTexture2D_sr8jb"] | ||||
| gradient = SubResource("Gradient_f8tdf") | ||||
| fill = 1 | ||||
| fill_from = Vector2(0.5, 0.5) | ||||
| metadata/_snap_enabled = true | ||||
| 
 | ||||
| [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_nuowb"] | ||||
| cull_mode = 2 | ||||
| shading_mode = 0 | ||||
| vertex_color_use_as_albedo = true | ||||
| albedo_color = Color(1, 0.993333, 0.8, 1) | ||||
| albedo_texture = SubResource("GradientTexture2D_sr8jb") | ||||
| 
 | ||||
| [sub_resource type="Animation" id="Animation_5t74j"] | ||||
| resource_name = "flicker" | ||||
| length = 2.0 | ||||
| loop_mode = 1 | ||||
| tracks/0/type = "value" | ||||
| tracks/0/imported = false | ||||
| tracks/0/enabled = true | ||||
| tracks/0/path = NodePath("FireballScaleRoot:scale") | ||||
| tracks/0/interp = 1 | ||||
| tracks/0/loop_wrap = true | ||||
| tracks/0/keys = { | ||||
| "times": PackedFloat32Array(0.00610052, 0.110417, 0.206101, 0.310417, 0.40305, 0.510417, 0.60305, 0.710417, 0.80305, 0.910417, 1, 1.11042, 1.2, 1.31042, 1.4, 1.51042, 1.6, 1.71042, 1.8, 1.9), | ||||
| "transitions": PackedFloat32Array(0.618, 1, 0.618, 1, 0.618, 1, 0.618, 1, 0.618, 1, 0.618, 1, 0.618, 1, 0.618, 1, 0.618, 1, 0.618, 1), | ||||
| "update": 0, | ||||
| "values": [Vector3(1, 1, 1), Vector3(1, 1.03, 1), Vector3(1, 1, 1), Vector3(1, 1.03, 1), Vector3(1, 1, 1), Vector3(1, 1.03, 1), Vector3(1, 1, 1), Vector3(1, 1.03, 1), Vector3(1, 1, 1), Vector3(1, 1.03, 1), Vector3(1, 1, 1), Vector3(1, 1.03, 1), Vector3(1, 1, 1), Vector3(1, 1.03, 1), Vector3(1, 1, 1), Vector3(1, 1.03, 1), Vector3(1, 1, 1), Vector3(1, 1.03, 1), Vector3(1, 1, 1), Vector3(1, 1.03, 1)] | ||||
| } | ||||
| tracks/1/type = "value" | ||||
| tracks/1/imported = false | ||||
| tracks/1/enabled = true | ||||
| tracks/1/path = NodePath("FireballScaleRoot:rotation") | ||||
| tracks/1/interp = 1 | ||||
| tracks/1/loop_wrap = false | ||||
| tracks/1/keys = { | ||||
| "times": PackedFloat32Array(0, 2), | ||||
| "transitions": PackedFloat32Array(1, 1), | ||||
| "update": 0, | ||||
| "values": [Vector3(0, 0, 0), Vector3(0, 2.0944, 0)] | ||||
| } | ||||
| 
 | ||||
| [sub_resource type="Animation" id="Animation_2co83"] | ||||
| length = 0.001 | ||||
| tracks/0/type = "value" | ||||
| tracks/0/imported = false | ||||
| tracks/0/enabled = true | ||||
| tracks/0/path = NodePath("FireballScaleRoot:scale") | ||||
| tracks/0/interp = 1 | ||||
| tracks/0/loop_wrap = true | ||||
| tracks/0/keys = { | ||||
| "times": PackedFloat32Array(0), | ||||
| "transitions": PackedFloat32Array(1), | ||||
| "update": 0, | ||||
| "values": [Vector3(1, 1, 1)] | ||||
| } | ||||
| tracks/1/type = "value" | ||||
| tracks/1/imported = false | ||||
| tracks/1/enabled = true | ||||
| tracks/1/path = NodePath("FireballScaleRoot:rotation") | ||||
| tracks/1/interp = 1 | ||||
| tracks/1/loop_wrap = true | ||||
| tracks/1/keys = { | ||||
| "times": PackedFloat32Array(0), | ||||
| "transitions": PackedFloat32Array(1), | ||||
| "update": 0, | ||||
| "values": [Vector3(0, 0, 0)] | ||||
| } | ||||
| 
 | ||||
| [sub_resource type="AnimationLibrary" id="AnimationLibrary_hmunj"] | ||||
| _data = { | ||||
| "RESET": SubResource("Animation_2co83"), | ||||
| "flicker": SubResource("Animation_5t74j") | ||||
| } | ||||
| 
 | ||||
| [sub_resource type="Animation" id="Animation_jhb3c"] | ||||
| length = 0.001 | ||||
| tracks/0/type = "value" | ||||
| tracks/0/imported = false | ||||
| tracks/0/enabled = true | ||||
| tracks/0/path = NodePath("ItemMeshContainer:position") | ||||
| tracks/0/interp = 1 | ||||
| tracks/0/loop_wrap = true | ||||
| tracks/0/keys = { | ||||
| "times": PackedFloat32Array(0), | ||||
| "transitions": PackedFloat32Array(1), | ||||
| "update": 0, | ||||
| "values": [Vector3(0, -0.2, 0)] | ||||
| } | ||||
| tracks/1/type = "value" | ||||
| tracks/1/imported = false | ||||
| tracks/1/enabled = true | ||||
| tracks/1/path = NodePath("Octahedron:rotation") | ||||
| tracks/1/interp = 1 | ||||
| tracks/1/loop_wrap = true | ||||
| tracks/1/keys = { | ||||
| "times": PackedFloat32Array(0), | ||||
| "transitions": PackedFloat32Array(1), | ||||
| "update": 0, | ||||
| "values": [Vector3(0, 0, 0)] | ||||
| } | ||||
| tracks/2/type = "value" | ||||
| tracks/2/imported = false | ||||
| tracks/2/enabled = true | ||||
| tracks/2/path = NodePath("ItemMeshContainer:rotation") | ||||
| tracks/2/interp = 1 | ||||
| tracks/2/loop_wrap = true | ||||
| tracks/2/keys = { | ||||
| "times": PackedFloat32Array(0), | ||||
| "transitions": PackedFloat32Array(1), | ||||
| "update": 0, | ||||
| "values": [Vector3(0, 0, 0)] | ||||
| } | ||||
| 
 | ||||
| [sub_resource type="Animation" id="Animation_283tf"] | ||||
| resource_name = "hover" | ||||
| length = 24.0 | ||||
| loop_mode = 1 | ||||
| tracks/0/type = "value" | ||||
| tracks/0/imported = false | ||||
| tracks/0/enabled = true | ||||
| tracks/0/path = NodePath("ItemMeshContainer:position") | ||||
| tracks/0/interp = 2 | ||||
| tracks/0/loop_wrap = true | ||||
| tracks/0/keys = { | ||||
| "times": PackedFloat32Array(0, 6, 12, 18), | ||||
| "transitions": PackedFloat32Array(1, 1, 1, 1), | ||||
| "update": 0, | ||||
| "values": [Vector3(0, -0.05, 0), Vector3(0, 0.05, 0), Vector3(0, -0.05, 0), Vector3(0, 0.05, 0)] | ||||
| } | ||||
| tracks/1/type = "value" | ||||
| tracks/1/imported = false | ||||
| tracks/1/enabled = true | ||||
| tracks/1/path = NodePath("Octahedron:rotation") | ||||
| tracks/1/interp = 1 | ||||
| tracks/1/loop_wrap = false | ||||
| tracks/1/keys = { | ||||
| "times": PackedFloat32Array(0, 24), | ||||
| "transitions": PackedFloat32Array(1, 1), | ||||
| "update": 0, | ||||
| "values": [Vector3(0, 0, 0), Vector3(0, 6.28319, -6.28319)] | ||||
| } | ||||
| tracks/2/type = "value" | ||||
| tracks/2/imported = false | ||||
| tracks/2/enabled = true | ||||
| tracks/2/path = NodePath("ItemMeshContainer:rotation") | ||||
| tracks/2/interp = 1 | ||||
| tracks/2/loop_wrap = false | ||||
| tracks/2/keys = { | ||||
| "times": PackedFloat32Array(0, 24), | ||||
| "transitions": PackedFloat32Array(1, 1), | ||||
| "update": 0, | ||||
| "values": [Vector3(0, 0, 0), Vector3(0, -6.28319, 0)] | ||||
| } | ||||
| 
 | ||||
| [sub_resource type="AnimationLibrary" id="AnimationLibrary_jwejx"] | ||||
| _data = { | ||||
| "RESET": SubResource("Animation_jhb3c"), | ||||
| "idle": SubResource("Animation_283tf") | ||||
| } | ||||
| 
 | ||||
| [node name="PowerballItem" instance=ExtResource("1_v5gka")] | ||||
| script = ExtResource("2_wxxbc") | ||||
| ball_type = 3 | ||||
| amount = 0 | ||||
| 
 | ||||
| [node name="Octahedron" parent="Pivot/Octahedron" index="0"] | ||||
| surface_material_override/0 = SubResource("ShaderMaterial_p5hhx") | ||||
| 
 | ||||
| [node name="Pivot" parent="Pivot/Octahedron/ItemMeshContainer" index="0"] | ||||
| transform = Transform3D(0.99863, 0.052336, 0, -0.052336, 0.99863, 0, 0, 0, 1, 0, 0, 0) | ||||
| 
 | ||||
| [node name="BallMesh" type="MeshInstance3D" parent="Pivot/Octahedron/ItemMeshContainer/Pivot" index="1"] | ||||
| transform = Transform3D(4, 0, 0, 0, 2.82843, -2.82843, 0, 2.82843, 2.82843, 0, 0, 0) | ||||
| mesh = SubResource("SphereMesh_qvrp7") | ||||
| 
 | ||||
| [node name="FireballPivot" type="Node3D" parent="Pivot/Octahedron/ItemMeshContainer/Pivot/BallMesh" index="0"] | ||||
| unique_name_in_owner = true | ||||
| 
 | ||||
| [node name="FireballScaleRoot" type="Node3D" parent="Pivot/Octahedron/ItemMeshContainer/Pivot/BallMesh/FireballPivot" index="0"] | ||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.1, 0) | ||||
| 
 | ||||
| [node name="fireball" parent="Pivot/Octahedron/ItemMeshContainer/Pivot/BallMesh/FireballPivot/FireballScaleRoot" index="0" instance=ExtResource("5_gi2ty")] | ||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.17, 0) | ||||
| 
 | ||||
| [node name="Fireball" parent="Pivot/Octahedron/ItemMeshContainer/Pivot/BallMesh/FireballPivot/FireballScaleRoot/fireball" index="0"] | ||||
| sorting_offset = -1.0 | ||||
| surface_material_override/0 = SubResource("StandardMaterial3D_nuowb") | ||||
| 
 | ||||
| [node name="FireballAnimation" type="AnimationPlayer" parent="Pivot/Octahedron/ItemMeshContainer/Pivot/BallMesh/FireballPivot" index="1"] | ||||
| libraries = { | ||||
| "": SubResource("AnimationLibrary_hmunj") | ||||
| } | ||||
| autoplay = "flicker" | ||||
| 
 | ||||
| [node name="@AnimationPlayer@183827" type="AnimationPlayer" parent="Pivot/Octahedron" index="2"] | ||||
| libraries = { | ||||
| "": SubResource("AnimationLibrary_jwejx") | ||||
| } | ||||
| autoplay = "idle" | ||||
| 
 | ||||
| [editable path="Pivot/Octahedron"] | ||||
| [editable path="Pivot/Octahedron/ItemMeshContainer/Pivot/BallMesh/FireballPivot/FireballScaleRoot/fireball"] | ||||
| @ -1,17 +0,0 @@ | ||||
| shader_type sky; | ||||
| 
 | ||||
| uniform sampler2D backdrop: filter_nearest_mipmap_anisotropic; | ||||
| 
 | ||||
| uniform vec3 cubemap_color: source_color = vec3(1.0); | ||||
| 
 | ||||
| uniform vec2 uv_offset = vec2(0.0); | ||||
| uniform vec2 uv_scale = vec2(1.0); | ||||
| 
 | ||||
| void sky() { | ||||
| 	if (AT_CUBEMAP_PASS) { | ||||
| 		COLOR = cubemap_color; | ||||
| 	} else { | ||||
| 		vec2 uv_mapped = SCREEN_UV * uv_scale + uv_offset; | ||||
| 		COLOR = texture(backdrop, uv_mapped).rgb; | ||||
| 	} | ||||
| } | ||||
| @ -180,6 +180,7 @@ func _get_gravity(point: Vector3) -> Vector3: | ||||
| 		var point_local := point - area.global_position | ||||
| 		var area_gravity: Vector3 | ||||
| 		if area.gravity_point: | ||||
| 			# TODO: `point` may need to be local | ||||
| 			var v := area.transform * area.gravity_direction - point_local | ||||
| 			if area.gravity_point_unit_distance > 0: | ||||
| 				var v_sq := v.length_squared() | ||||
|  | ||||
| @ -11,16 +11,6 @@ const UNKNOWN_LABEL_SYM := "[unknown]" | ||||
| 		action = value | ||||
| 		_update() | ||||
| 
 | ||||
| @export var show_name := true: | ||||
| 	set(value): | ||||
| 		show_name = value | ||||
| 		_update() | ||||
| 
 | ||||
| @export var event_index := 0: | ||||
| 	set(value): | ||||
| 		event_index = value | ||||
| 		_update() | ||||
| 
 | ||||
| 
 | ||||
| func _ready() -> void: | ||||
| 	_update() | ||||
| @ -29,20 +19,15 @@ func _ready() -> void: | ||||
| func _update() -> void: | ||||
| 	var input_symbol: String | ||||
| 	var actions := InputMap.action_get_events(action) | ||||
| 	if actions and event_index < len(actions): | ||||
| 		var primary := actions[event_index] | ||||
| 	if actions: | ||||
| 		var primary := actions[0] | ||||
| 		input_symbol = PromptMap.from_event(primary) | ||||
| 
 | ||||
| 	var loc_action := tr(ControlBinding.ACTION_KEY_FMT.format([action])) | ||||
| 
 | ||||
| 	if not input_symbol: | ||||
| 		input_symbol = str(PromptMap.UNKNOWN_INPUT_SYMBOL) | ||||
| 	if show_name: | ||||
| 		text = PROMPT_FORMAT.format( | ||||
| 			[ | ||||
| 				input_symbol if input_symbol else str(PromptMap.UNKNOWN_INPUT_SYMBOL), | ||||
| 				loc_action if loc_action else str(action) | ||||
| 			] | ||||
| 		) | ||||
| 	else: | ||||
| 		text = input_symbol | ||||
| 	text = PROMPT_FORMAT.format( | ||||
| 		[ | ||||
| 			input_symbol if input_symbol else str(PromptMap.UNKNOWN_INPUT_SYMBOL), | ||||
| 			loc_action if loc_action else str(action) | ||||
| 		] | ||||
| 	) | ||||
|  | ||||
| @ -9,5 +9,5 @@ anchor_bottom = 1.0 | ||||
| grow_horizontal = 2 | ||||
| grow_vertical = 2 | ||||
| theme_type_variation = &"InputPrompt" | ||||
| text = "❓ - ACTION_" | ||||
| text = "❓ - [unknown]" | ||||
| script = ExtResource("1_qq6w5") | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| [gd_resource type="Theme" load_steps=10 format=3 uid="uid://diodjft5u2cck"] | ||||
| [gd_resource type="Theme" load_steps=9 format=3 uid="uid://diodjft5u2cck"] | ||||
| 
 | ||||
| [ext_resource type="FontFile" uid="uid://dsa0oh7c0h4pu" path="res://assets/fonts/Racing_Sans_One/RacingSansOne-Regular.ttf" id="1_3rv2b"] | ||||
| [ext_resource type="FontFile" uid="uid://comihs66wounx" path="res://assets/fonts/Dokdo/Dokdo-Regular.ttf" id="1_eha6a"] | ||||
| @ -6,17 +6,6 @@ | ||||
| [ext_resource type="FontFile" uid="uid://dyog4ex5nqfat" path="res://assets/fonts/promptfont/promptfont.otf" id="2_8kux8"] | ||||
| [ext_resource type="FontFile" uid="uid://s4c1kf0rk2mb" path="res://assets/fonts/Geo/Geo-Regular.ttf" id="3_cee6l"] | ||||
| 
 | ||||
| [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5pkn5"] | ||||
| content_margin_left = 16.0 | ||||
| content_margin_top = 8.0 | ||||
| content_margin_right = 16.0 | ||||
| content_margin_bottom = 8.0 | ||||
| bg_color = Color(0.1, 0.1, 0.1, 0.6) | ||||
| corner_radius_top_left = 3 | ||||
| corner_radius_top_right = 3 | ||||
| corner_radius_bottom_right = 3 | ||||
| corner_radius_bottom_left = 3 | ||||
| 
 | ||||
| [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rq1no"] | ||||
| content_margin_left = 0.0 | ||||
| content_margin_top = 0.0 | ||||
| @ -73,13 +62,6 @@ ChannelMixerIcon/colors/font_outline_color = Color(0, 0, 0, 1) | ||||
| ChannelMixerIcon/constants/outline_size = 5 | ||||
| ChannelMixerIcon/font_sizes/font_size = 24 | ||||
| ChannelMixerIcon/fonts/font = ExtResource("2_8kux8") | ||||
| CharSelectButton/base_type = &"Button" | ||||
| CharSelectButton/colors/font_color = Color(1, 1, 0.870588, 1) | ||||
| CharSelectButton/colors/font_outline_color = Color(0, 0, 0, 1) | ||||
| CharSelectButton/constants/outline_size = 8 | ||||
| CharSelectButton/font_sizes/font_size = 32 | ||||
| CharSelectButton/fonts/font = ExtResource("2_8kux8") | ||||
| CharSelectButton/styles/normal = SubResource("StyleBoxFlat_5pkn5") | ||||
| CheckerContainerEven/base_type = &"PanelContainer" | ||||
| CheckerContainerEven/styles/panel = SubResource("StyleBoxFlat_rq1no") | ||||
| CheckerContainerOdd/base_type = &"PanelContainer" | ||||
| @ -111,17 +93,6 @@ HeaderSmall/font_sizes/font_size = 20 | ||||
| HeaderXLarge/base_type = &"Label" | ||||
| HeaderXLarge/constants/outline_size = 10 | ||||
| HeaderXLarge/font_sizes/font_size = 36 | ||||
| IconButton/base_type = &"Button" | ||||
| IconButton/colors/font_outline_color = Color(0, 0, 0, 1) | ||||
| IconButton/constants/outline_size = 6 | ||||
| IconButton/font_sizes/font_size = 36 | ||||
| IconButton/fonts/font = ExtResource("2_8kux8") | ||||
| IconXL/base_type = &"Label" | ||||
| IconXL/colors/font_color = Color(1, 1, 0.870588, 1) | ||||
| IconXL/colors/font_outline_color = Color(0, 0, 0, 1) | ||||
| IconXL/constants/outline_size = 8 | ||||
| IconXL/font_sizes/font_size = 42 | ||||
| IconXL/fonts/font = ExtResource("2_8kux8") | ||||
| InputBindButton/base_type = &"UIButton" | ||||
| InputBindButton/colors/font_color = Color(1, 1, 0.870588, 1) | ||||
| InputBindButton/constants/outline_size = 8 | ||||
| @ -137,9 +108,6 @@ PauseMenuButton/colors/font_outline_color = Color(0, 0, 0, 1) | ||||
| PauseMenuButton/constants/outline_size = 6 | ||||
| PauseMenuButton/font_sizes/font_size = 32 | ||||
| PauseMenuButton/fonts/font = ExtResource("2_5ty6u") | ||||
| PlayerNameInput/base_type = &"LineEdit" | ||||
| PlayerNameInput/font_sizes/font_size = 32 | ||||
| PlayerNameInput/fonts/font = ExtResource("1_3rv2b") | ||||
| QuantityLabel/base_type = &"Label" | ||||
| QuantityLabel/colors/font_color = Color(0.819608, 0.196078, 0.196078, 1) | ||||
| QuantityLabel/colors/font_outline_color = Color(1, 0.901961, 0.509804, 1) | ||||
| @ -169,9 +137,5 @@ ShotFeedback/constants/shadow_offset_x = 6 | ||||
| ShotFeedback/constants/shadow_offset_y = 4 | ||||
| ShotFeedback/font_sizes/normal_font_size = 272 | ||||
| ShotFeedback/fonts/normal_font = ExtResource("1_eha6a") | ||||
| TitleScreenMenuLabel/base_type = &"Label" | ||||
| TitleScreenMenuLabel/colors/font_outline_color = Color(0, 0, 0, 1) | ||||
| TitleScreenMenuLabel/constants/outline_size = 6 | ||||
| TitleScreenMenuLabel/font_sizes/font_size = 32 | ||||
| UIButton/base_type = &"Button" | ||||
| UIButton/styles/normal = SubResource("StyleBoxFlat_ynsl8") | ||||
|  | ||||
| @ -1,26 +1,23 @@ | ||||
| extends Control | ||||
| ## Menu shown in-game when the user presses pause. | ||||
| 
 | ||||
| @export var settings_scene: PackedScene | ||||
| 
 | ||||
| var _freeze_input := false | ||||
| const SETTINGS_SCENE := preload("res://src/ui/menus/settings_menu/settings_menu.tscn") | ||||
| 
 | ||||
| @onready var menu_list: VBoxContainer = %MenuList | ||||
| @onready var quit_confirm: CenterContainer = %QuitConfirm | ||||
| @onready var end_game_confirm: CenterContainer = %EndGameConfirm | ||||
| @onready var settings_container: MarginContainer = %SettingsContainer | ||||
| 
 | ||||
| @onready var transition_animation: AnimationPlayer = %TransitionAnimation | ||||
| 
 | ||||
| @onready var game: Game = get_tree().get_first_node_in_group(Game.group) | ||||
| 
 | ||||
| 
 | ||||
| func _ready() -> void: | ||||
| 	Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) | ||||
| 
 | ||||
| 
 | ||||
| func _exit_tree() -> void: | ||||
| 	Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) | ||||
| 
 | ||||
| 
 | ||||
| func _unhandled_key_input(event: InputEvent) -> void: | ||||
| 	if not _freeze_input and event.is_action_pressed("pause"): | ||||
| 	if event.is_action_pressed("pause"): | ||||
| 		get_viewport().set_input_as_handled() | ||||
| 		resume() | ||||
| 
 | ||||
| @ -34,12 +31,11 @@ func _hide() -> void: | ||||
| 
 | ||||
| 
 | ||||
| func resume() -> void: | ||||
| 	Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) | ||||
| 	queue_free() | ||||
| 
 | ||||
| 
 | ||||
| func settings() -> void: | ||||
| 	var instance: Control = settings_scene.instantiate() | ||||
| 	var instance: Control = SETTINGS_SCENE.instantiate() | ||||
| 	settings_container.add_child(instance) | ||||
| 	instance.tree_exited.connect(_unhide) | ||||
| 	_hide() | ||||
| @ -55,19 +51,3 @@ func cancel_quit() -> void: | ||||
| 
 | ||||
| func confirm_quit() -> void: | ||||
| 	get_tree().root.propagate_notification(NOTIFICATION_WM_CLOSE_REQUEST) | ||||
| 
 | ||||
| 
 | ||||
| func end_game() -> void: | ||||
| 	end_game_confirm.show() | ||||
| 
 | ||||
| 
 | ||||
| func cancel_end_game() -> void: | ||||
| 	end_game_confirm.hide() | ||||
| 
 | ||||
| 
 | ||||
| func _return_to_title() -> void: | ||||
| 	game.queue_scene(TitleScreen.SCENE) | ||||
| 
 | ||||
| 
 | ||||
| func confirm_end_game() -> void: | ||||
| 	transition_animation.play("fade_to_black") | ||||
|  | ||||
| @ -1,83 +1,7 @@ | ||||
| [gd_scene load_steps=7 format=3 uid="uid://byvjsvavbg5xe"] | ||||
| [gd_scene load_steps=3 format=3 uid="uid://byvjsvavbg5xe"] | ||||
| 
 | ||||
| [ext_resource type="FontFile" uid="uid://b6gxwgomstkgu" path="res://assets/fonts/Geo/Geo-Italic.ttf" id="1_4nw1f"] | ||||
| [ext_resource type="Script" path="res://src/ui/menus/pause_menu/pause_menu.gd" id="1_rd0j2"] | ||||
| [ext_resource type="PackedScene" uid="uid://d3eaqw2rdurct" path="res://src/ui/menus/settings_menu/settings_menu.tscn" id="2_kjr35"] | ||||
| 
 | ||||
| [sub_resource type="Animation" id="Animation_qmmn2"] | ||||
| length = 0.001 | ||||
| tracks/0/type = "value" | ||||
| tracks/0/imported = false | ||||
| tracks/0/enabled = true | ||||
| tracks/0/path = NodePath("TransitionAnimation/TransitionShade:color") | ||||
| tracks/0/interp = 1 | ||||
| tracks/0/loop_wrap = true | ||||
| tracks/0/keys = { | ||||
| "times": PackedFloat32Array(0), | ||||
| "transitions": PackedFloat32Array(1), | ||||
| "update": 0, | ||||
| "values": [Color(0, 0, 0, 0)] | ||||
| } | ||||
| tracks/1/type = "value" | ||||
| tracks/1/imported = false | ||||
| tracks/1/enabled = true | ||||
| tracks/1/path = NodePath("TransitionAnimation/TransitionShade:visible") | ||||
| tracks/1/interp = 1 | ||||
| tracks/1/loop_wrap = true | ||||
| tracks/1/keys = { | ||||
| "times": PackedFloat32Array(0), | ||||
| "transitions": PackedFloat32Array(1), | ||||
| "update": 1, | ||||
| "values": [false] | ||||
| } | ||||
| 
 | ||||
| [sub_resource type="Animation" id="Animation_rq4bw"] | ||||
| resource_name = "fade_to_black" | ||||
| length = 0.6 | ||||
| tracks/0/type = "value" | ||||
| tracks/0/imported = false | ||||
| tracks/0/enabled = true | ||||
| tracks/0/path = NodePath("TransitionAnimation/TransitionShade:color") | ||||
| tracks/0/interp = 1 | ||||
| tracks/0/loop_wrap = true | ||||
| tracks/0/keys = { | ||||
| "times": PackedFloat32Array(0, 0.6), | ||||
| "transitions": PackedFloat32Array(1.618, 1), | ||||
| "update": 0, | ||||
| "values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)] | ||||
| } | ||||
| tracks/1/type = "method" | ||||
| tracks/1/imported = false | ||||
| tracks/1/enabled = true | ||||
| tracks/1/path = NodePath(".") | ||||
| tracks/1/interp = 1 | ||||
| tracks/1/loop_wrap = true | ||||
| tracks/1/keys = { | ||||
| "times": PackedFloat32Array(0.6), | ||||
| "transitions": PackedFloat32Array(1), | ||||
| "values": [{ | ||||
| "args": [], | ||||
| "method": &"_return_to_title" | ||||
| }] | ||||
| } | ||||
| tracks/2/type = "value" | ||||
| tracks/2/imported = false | ||||
| tracks/2/enabled = true | ||||
| tracks/2/path = NodePath("TransitionAnimation/TransitionShade:visible") | ||||
| tracks/2/interp = 1 | ||||
| tracks/2/loop_wrap = true | ||||
| tracks/2/keys = { | ||||
| "times": PackedFloat32Array(0), | ||||
| "transitions": PackedFloat32Array(1), | ||||
| "update": 1, | ||||
| "values": [true] | ||||
| } | ||||
| 
 | ||||
| [sub_resource type="AnimationLibrary" id="AnimationLibrary_7b7fo"] | ||||
| _data = { | ||||
| "RESET": SubResource("Animation_qmmn2"), | ||||
| "fade_to_black": SubResource("Animation_rq4bw") | ||||
| } | ||||
| 
 | ||||
| [node name="PauseMenu" type="Control"] | ||||
| process_mode = 3 | ||||
| @ -88,7 +12,6 @@ anchor_bottom = 1.0 | ||||
| grow_horizontal = 2 | ||||
| grow_vertical = 2 | ||||
| script = ExtResource("1_rd0j2") | ||||
| settings_scene = ExtResource("2_kjr35") | ||||
| 
 | ||||
| [node name="Shade" type="ColorRect" parent="."] | ||||
| layout_mode = 1 | ||||
| @ -134,12 +57,6 @@ layout_mode = 2 | ||||
| theme_type_variation = &"PauseMenuButton" | ||||
| text = "PAUSE_SETTINGS" | ||||
| 
 | ||||
| [node name="EndGameButton" type="Button" parent="MarginContainer/MenuList"] | ||||
| layout_mode = 2 | ||||
| theme_type_variation = &"PauseMenuButton" | ||||
| theme_override_colors/font_color = Color(0.819608, 0.196078, 0.196078, 1) | ||||
| text = "PAUSE_END" | ||||
| 
 | ||||
| [node name="QuitButton" type="Button" parent="MarginContainer/MenuList"] | ||||
| layout_mode = 2 | ||||
| theme_type_variation = &"PauseMenuButton" | ||||
| @ -207,71 +124,8 @@ size_flags_horizontal = 3 | ||||
| theme_type_variation = &"AlertButton" | ||||
| text = "PAUSE_QUIT" | ||||
| 
 | ||||
| [node name="EndGameConfirm" type="CenterContainer" parent="."] | ||||
| unique_name_in_owner = true | ||||
| visible = false | ||||
| layout_mode = 1 | ||||
| anchors_preset = 15 | ||||
| anchor_right = 1.0 | ||||
| anchor_bottom = 1.0 | ||||
| grow_horizontal = 2 | ||||
| grow_vertical = 2 | ||||
| 
 | ||||
| [node name="PanelContainer" type="PanelContainer" parent="EndGameConfirm"] | ||||
| layout_mode = 2 | ||||
| 
 | ||||
| [node name="MarginContainer" type="MarginContainer" parent="EndGameConfirm/PanelContainer"] | ||||
| layout_mode = 2 | ||||
| theme_override_constants/margin_left = 8 | ||||
| theme_override_constants/margin_top = 8 | ||||
| theme_override_constants/margin_right = 8 | ||||
| theme_override_constants/margin_bottom = 8 | ||||
| 
 | ||||
| [node name="VBoxContainer" type="VBoxContainer" parent="EndGameConfirm/PanelContainer/MarginContainer"] | ||||
| layout_mode = 2 | ||||
| 
 | ||||
| [node name="Label" type="Label" parent="EndGameConfirm/PanelContainer/MarginContainer/VBoxContainer"] | ||||
| layout_mode = 2 | ||||
| theme_override_font_sizes/font_size = 24 | ||||
| text = "PAUSE_END_MSG" | ||||
| horizontal_alignment = 1 | ||||
| 
 | ||||
| [node name="HBoxContainer" type="HBoxContainer" parent="EndGameConfirm/PanelContainer/MarginContainer/VBoxContainer"] | ||||
| layout_mode = 2 | ||||
| theme_override_constants/separation = 16 | ||||
| 
 | ||||
| [node name="CancelButton" type="Button" parent="EndGameConfirm/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer"] | ||||
| layout_mode = 2 | ||||
| size_flags_horizontal = 3 | ||||
| theme_type_variation = &"CancelButton" | ||||
| text = "UI_CANCEL" | ||||
| 
 | ||||
| [node name="ConfirmEndGameButton" type="Button" parent="EndGameConfirm/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer"] | ||||
| layout_mode = 2 | ||||
| size_flags_horizontal = 3 | ||||
| theme_type_variation = &"AlertButton" | ||||
| text = "PAUSE_END" | ||||
| 
 | ||||
| [node name="TransitionAnimation" type="AnimationPlayer" parent="."] | ||||
| unique_name_in_owner = true | ||||
| libraries = { | ||||
| "": SubResource("AnimationLibrary_7b7fo") | ||||
| } | ||||
| 
 | ||||
| [node name="TransitionShade" type="ColorRect" parent="TransitionAnimation"] | ||||
| visible = false | ||||
| anchors_preset = 15 | ||||
| anchor_right = 1.0 | ||||
| anchor_bottom = 1.0 | ||||
| grow_horizontal = 2 | ||||
| grow_vertical = 2 | ||||
| color = Color(0, 0, 0, 0) | ||||
| 
 | ||||
| [connection signal="pressed" from="MarginContainer/MenuList/ResumeButton" to="." method="resume"] | ||||
| [connection signal="pressed" from="MarginContainer/MenuList/SettingsButton" to="." method="settings"] | ||||
| [connection signal="pressed" from="MarginContainer/MenuList/EndGameButton" to="." method="end_game"] | ||||
| [connection signal="pressed" from="MarginContainer/MenuList/QuitButton" to="." method="quit"] | ||||
| [connection signal="pressed" from="QuitConfirm/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer/CancelButton" to="." method="cancel_quit"] | ||||
| [connection signal="pressed" from="QuitConfirm/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer/ConfirmQuitButton" to="." method="confirm_quit"] | ||||
| [connection signal="pressed" from="EndGameConfirm/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer/CancelButton" to="." method="cancel_end_game"] | ||||
| [connection signal="pressed" from="EndGameConfirm/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer/ConfirmEndGameButton" to="." method="confirm_end_game"] | ||||
|  | ||||
| @ -1,94 +0,0 @@ | ||||
| extends PanelContainer | ||||
| 
 | ||||
| const WORLD_SCENE_PATH := "res://src/world/world.tscn" | ||||
| 
 | ||||
| const RANDOM_PLAYER_COLORS := [ | ||||
| 	Color.LIGHT_CORAL, | ||||
| 	Color.GOLDENROD, | ||||
| 	Color.KHAKI, | ||||
| 	Color.AQUAMARINE, | ||||
| 	Color.SKY_BLUE, | ||||
| 	Color.VIOLET, | ||||
| ] | ||||
| 
 | ||||
| const MIN_PLAYERS := 2 | ||||
| 
 | ||||
| @export var player_setup_scene: PackedScene | ||||
| 
 | ||||
| @onready var map_select: ItemList = %MapSelect | ||||
| 
 | ||||
| @onready var start_button: Button = %Start | ||||
| 
 | ||||
| @onready var player_setup_list: HBoxContainer = %PlayerSetupList | ||||
| 
 | ||||
| @onready var game: Game = get_tree().get_first_node_in_group(Game.group) | ||||
| 
 | ||||
| 
 | ||||
| func _ready() -> void: | ||||
| 	# Populate map selection | ||||
| 	for level: Level in Level.catalog.levels: | ||||
| 		map_select.add_item(level.level_name, level.preview) | ||||
| 
 | ||||
| 	check_start_conditions() | ||||
| 
 | ||||
| 
 | ||||
| func _input(event: InputEvent) -> void: | ||||
| 	if event.is_action_pressed("ui_start"): | ||||
| 		add_player(InputMethod.get_method(event)) | ||||
| 
 | ||||
| 
 | ||||
| ## Close menu without starting game. | ||||
| func cancel() -> void: | ||||
| 	queue_free() | ||||
| 
 | ||||
| 
 | ||||
| ## Start with the current game configuration. | ||||
| func start() -> void: | ||||
| 	var player_list := players() | ||||
| 	var init_world := func(world: World) -> void: | ||||
| 		world.manager = RoundRobinManager.new() | ||||
| 		world.manager.players = player_list | ||||
| 	game.queue_scene(WORLD_SCENE_PATH).then(init_world) | ||||
| 
 | ||||
| 
 | ||||
| ## Returns the `Level` selected by the user if there is one, or `null` if no level is selected. | ||||
| func selected_level() -> Level: | ||||
| 	var selections := map_select.get_selected_items() | ||||
| 	if selections: | ||||
| 		return Level.catalog.levels[selections[0]] | ||||
| 	return null | ||||
| 
 | ||||
| 
 | ||||
| ## Build the array of players represented by the selections made here. | ||||
| func players() -> Array[WorldPlayer]: | ||||
| 	var arr: Array[WorldPlayer] = [] | ||||
| 	arr.assign( | ||||
| 		player_setup_list.get_children().map( | ||||
| 			func(s: PlayerSetup) -> WorldPlayer: return s.build_player() | ||||
| 		) | ||||
| 	) | ||||
| 	return arr | ||||
| 
 | ||||
| 
 | ||||
| ## Add a new PlayerSetup node for the given input method. | ||||
| func add_player(input_method: InputMethod.Type) -> void: | ||||
| 	var instance: PlayerSetup = player_setup_scene.instantiate() | ||||
| 	instance.input_method = input_method | ||||
| 	instance.player_color = RANDOM_PLAYER_COLORS.pick_random() | ||||
| 	player_setup_list.add_child(instance) | ||||
| 	instance.tree_exited.connect(check_start_conditions) | ||||
| 	check_start_conditions() | ||||
| 
 | ||||
| 
 | ||||
| func _can_start() -> bool: | ||||
| 	return selected_level() and len(players()) >= MIN_PLAYERS | ||||
| 
 | ||||
| 
 | ||||
| ## Check if the game can be started with the current selection, | ||||
| ## and set the start button status appropriately. | ||||
| func check_start_conditions() -> void: | ||||
| 	start_button.disabled = not _can_start() | ||||
| 
 | ||||
| 
 | ||||
| func _on_add_player_button_pressed() -> void: | ||||
| 	add_player(InputMethod.Type.MOUSE_KEYBOARD) | ||||
| @ -1,264 +0,0 @@ | ||||
| [gd_scene load_steps=7 format=3 uid="uid://ccx2u5oli6men"] | ||||
| 
 | ||||
| [ext_resource type="Script" path="res://src/ui/menus/title_screen/deathmatch_setup/deathmatch_setup.gd" id="1_bchix"] | ||||
| [ext_resource type="PackedScene" uid="uid://cr13d4p235b5y" path="res://src/ui/menus/title_screen/deathmatch_setup/player_setup/player_setup.tscn" id="2_on4ab"] | ||||
| [ext_resource type="PackedScene" uid="uid://b47goj32i6sdh" path="res://src/ui/elements/input_prompt/input_prompt.tscn" id="4_2vecx"] | ||||
| 
 | ||||
| [sub_resource type="Animation" id="Animation_r61vj"] | ||||
| length = 0.001 | ||||
| tracks/0/type = "value" | ||||
| tracks/0/imported = false | ||||
| tracks/0/enabled = true | ||||
| tracks/0/path = NodePath("GamepadStartSymbol:modulate") | ||||
| tracks/0/interp = 1 | ||||
| tracks/0/loop_wrap = true | ||||
| tracks/0/keys = { | ||||
| "times": PackedFloat32Array(0), | ||||
| "transitions": PackedFloat32Array(1), | ||||
| "update": 0, | ||||
| "values": [Color(1, 1, 1, 0)] | ||||
| } | ||||
| tracks/1/type = "value" | ||||
| tracks/1/imported = false | ||||
| tracks/1/enabled = true | ||||
| tracks/1/path = NodePath("KeyboardStartSymbol:modulate") | ||||
| tracks/1/interp = 1 | ||||
| tracks/1/loop_wrap = true | ||||
| tracks/1/keys = { | ||||
| "times": PackedFloat32Array(0), | ||||
| "transitions": PackedFloat32Array(1), | ||||
| "update": 0, | ||||
| "values": [Color(1, 1, 1, 1)] | ||||
| } | ||||
| 
 | ||||
| [sub_resource type="Animation" id="Animation_c3p73"] | ||||
| resource_name = "rotate" | ||||
| length = 4.8 | ||||
| loop_mode = 1 | ||||
| tracks/0/type = "value" | ||||
| tracks/0/imported = false | ||||
| tracks/0/enabled = true | ||||
| tracks/0/path = NodePath("GamepadStartSymbol:modulate") | ||||
| tracks/0/interp = 2 | ||||
| tracks/0/loop_wrap = true | ||||
| tracks/0/keys = { | ||||
| "times": PackedFloat32Array(0, 1.6, 2.4, 3.2, 4), | ||||
| "transitions": PackedFloat32Array(1, 0.618, 1, 1.618, 1), | ||||
| "update": 0, | ||||
| "values": [Color(1, 1, 1, 0), Color(1, 1, 1, 0), Color(1, 1, 1, 1), Color(1, 1, 1, 1), Color(1, 1, 1, 0)] | ||||
| } | ||||
| tracks/1/type = "value" | ||||
| tracks/1/imported = false | ||||
| tracks/1/enabled = true | ||||
| tracks/1/path = NodePath("KeyboardStartSymbol:modulate") | ||||
| tracks/1/interp = 2 | ||||
| tracks/1/loop_wrap = true | ||||
| tracks/1/keys = { | ||||
| "times": PackedFloat32Array(0, 0.8, 1.6, 4, 4.8), | ||||
| "transitions": PackedFloat32Array(1, 1.618, 1, 0.618, 1), | ||||
| "update": 0, | ||||
| "values": [Color(1, 1, 1, 1), Color(1, 1, 1, 1), Color(1, 1, 1, 0), Color(1, 1, 1, 0), Color(1, 1, 1, 1)] | ||||
| } | ||||
| 
 | ||||
| [sub_resource type="AnimationLibrary" id="AnimationLibrary_5sl0m"] | ||||
| _data = { | ||||
| "RESET": SubResource("Animation_r61vj"), | ||||
| "rotate": SubResource("Animation_c3p73") | ||||
| } | ||||
| 
 | ||||
| [node name="DeathmatchSetup" type="PanelContainer"] | ||||
| anchors_preset = 15 | ||||
| anchor_right = 1.0 | ||||
| anchor_bottom = 1.0 | ||||
| grow_horizontal = 2 | ||||
| grow_vertical = 2 | ||||
| script = ExtResource("1_bchix") | ||||
| player_setup_scene = ExtResource("2_on4ab") | ||||
| 
 | ||||
| [node name="MarginContainer" type="MarginContainer" parent="."] | ||||
| layout_mode = 2 | ||||
| theme_override_constants/margin_left = 32 | ||||
| theme_override_constants/margin_top = 32 | ||||
| theme_override_constants/margin_right = 32 | ||||
| theme_override_constants/margin_bottom = 80 | ||||
| 
 | ||||
| [node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] | ||||
| layout_mode = 2 | ||||
| 
 | ||||
| [node name="Label" type="Label" parent="MarginContainer/VBoxContainer"] | ||||
| layout_mode = 2 | ||||
| theme_type_variation = &"HeaderXLarge" | ||||
| text = "DM_HEADING" | ||||
| 
 | ||||
| [node name="MapSelectContainer" type="PanelContainer" parent="MarginContainer/VBoxContainer"] | ||||
| layout_mode = 2 | ||||
| 
 | ||||
| [node name="MarginContainer" type="MarginContainer" parent="MarginContainer/VBoxContainer/MapSelectContainer"] | ||||
| layout_mode = 2 | ||||
| theme_override_constants/margin_left = 16 | ||||
| theme_override_constants/margin_top = 16 | ||||
| theme_override_constants/margin_right = 16 | ||||
| theme_override_constants/margin_bottom = 16 | ||||
| 
 | ||||
| [node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/MapSelectContainer/MarginContainer"] | ||||
| layout_mode = 2 | ||||
| 
 | ||||
| [node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer/MapSelectContainer/MarginContainer/VBoxContainer"] | ||||
| layout_mode = 2 | ||||
| 
 | ||||
| [node name="Label" type="Label" parent="MarginContainer/VBoxContainer/MapSelectContainer/MarginContainer/VBoxContainer/HBoxContainer"] | ||||
| layout_mode = 2 | ||||
| theme_type_variation = &"HeaderLarge" | ||||
| text = "DM_MAP" | ||||
| 
 | ||||
| [node name="HSeparator" type="HSeparator" parent="MarginContainer/VBoxContainer/MapSelectContainer/MarginContainer/VBoxContainer/HBoxContainer"] | ||||
| layout_mode = 2 | ||||
| size_flags_horizontal = 3 | ||||
| 
 | ||||
| [node name="MapSelect" type="ItemList" parent="MarginContainer/VBoxContainer/MapSelectContainer/MarginContainer/VBoxContainer"] | ||||
| unique_name_in_owner = true | ||||
| custom_minimum_size = Vector2(0, 130) | ||||
| layout_mode = 2 | ||||
| theme_override_constants/v_separation = 32 | ||||
| theme_override_constants/h_separation = 32 | ||||
| max_columns = 8 | ||||
| icon_mode = 0 | ||||
| fixed_icon_size = Vector2i(64, 64) | ||||
| 
 | ||||
| [node name="PlayersContainer" type="PanelContainer" parent="MarginContainer/VBoxContainer"] | ||||
| layout_mode = 2 | ||||
| size_flags_vertical = 3 | ||||
| 
 | ||||
| [node name="MarginContainer" type="MarginContainer" parent="MarginContainer/VBoxContainer/PlayersContainer"] | ||||
| layout_mode = 2 | ||||
| theme_override_constants/margin_left = 16 | ||||
| theme_override_constants/margin_top = 16 | ||||
| theme_override_constants/margin_right = 16 | ||||
| theme_override_constants/margin_bottom = 16 | ||||
| 
 | ||||
| [node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/PlayersContainer/MarginContainer"] | ||||
| layout_mode = 2 | ||||
| 
 | ||||
| [node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer/PlayersContainer/MarginContainer/VBoxContainer"] | ||||
| layout_mode = 2 | ||||
| 
 | ||||
| [node name="Label" type="Label" parent="MarginContainer/VBoxContainer/PlayersContainer/MarginContainer/VBoxContainer/HBoxContainer"] | ||||
| layout_mode = 2 | ||||
| theme_type_variation = &"HeaderLarge" | ||||
| text = "DM_PLAYERS" | ||||
| 
 | ||||
| [node name="HSeparator" type="HSeparator" parent="MarginContainer/VBoxContainer/PlayersContainer/MarginContainer/VBoxContainer/HBoxContainer"] | ||||
| layout_mode = 2 | ||||
| size_flags_horizontal = 3 | ||||
| 
 | ||||
| [node name="ScrollContainer" type="ScrollContainer" parent="MarginContainer/VBoxContainer/PlayersContainer/MarginContainer/VBoxContainer"] | ||||
| layout_mode = 2 | ||||
| size_flags_vertical = 3 | ||||
| 
 | ||||
| [node name="MarginContainer" type="MarginContainer" parent="MarginContainer/VBoxContainer/PlayersContainer/MarginContainer/VBoxContainer/ScrollContainer"] | ||||
| layout_mode = 2 | ||||
| size_flags_horizontal = 3 | ||||
| size_flags_vertical = 3 | ||||
| theme_type_variation = &"SettingsListMargin" | ||||
| 
 | ||||
| [node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer/PlayersContainer/MarginContainer/VBoxContainer/ScrollContainer/MarginContainer"] | ||||
| layout_mode = 2 | ||||
| 
 | ||||
| [node name="PlayerSetupList" type="HBoxContainer" parent="MarginContainer/VBoxContainer/PlayersContainer/MarginContainer/VBoxContainer/ScrollContainer/MarginContainer/HBoxContainer"] | ||||
| unique_name_in_owner = true | ||||
| layout_mode = 2 | ||||
| 
 | ||||
| [node name="AddPlayerButton" type="Button" parent="MarginContainer/VBoxContainer/PlayersContainer/MarginContainer/VBoxContainer/ScrollContainer/MarginContainer/HBoxContainer"] | ||||
| custom_minimum_size = Vector2(400, 0) | ||||
| layout_mode = 2 | ||||
| 
 | ||||
| [node name="CenterContainer" type="CenterContainer" parent="MarginContainer/VBoxContainer/PlayersContainer/MarginContainer/VBoxContainer/ScrollContainer/MarginContainer/HBoxContainer/AddPlayerButton"] | ||||
| layout_mode = 1 | ||||
| anchors_preset = 15 | ||||
| anchor_right = 1.0 | ||||
| anchor_bottom = 1.0 | ||||
| grow_horizontal = 2 | ||||
| grow_vertical = 2 | ||||
| 
 | ||||
| [node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/PlayersContainer/MarginContainer/VBoxContainer/ScrollContainer/MarginContainer/HBoxContainer/AddPlayerButton/CenterContainer"] | ||||
| layout_mode = 2 | ||||
| alignment = 1 | ||||
| 
 | ||||
| [node name="SymbolBlinker" type="Control" parent="MarginContainer/VBoxContainer/PlayersContainer/MarginContainer/VBoxContainer/ScrollContainer/MarginContainer/HBoxContainer/AddPlayerButton/CenterContainer/VBoxContainer"] | ||||
| custom_minimum_size = Vector2(64, 64) | ||||
| layout_mode = 2 | ||||
| mouse_filter = 1 | ||||
| 
 | ||||
| [node name="GamepadStartSymbol" parent="MarginContainer/VBoxContainer/PlayersContainer/MarginContainer/VBoxContainer/ScrollContainer/MarginContainer/HBoxContainer/AddPlayerButton/CenterContainer/VBoxContainer/SymbolBlinker" instance=ExtResource("4_2vecx")] | ||||
| modulate = Color(1, 1, 1, 0) | ||||
| layout_mode = 1 | ||||
| anchors_preset = 8 | ||||
| anchor_left = 0.5 | ||||
| anchor_top = 0.5 | ||||
| anchor_right = 0.5 | ||||
| anchor_bottom = 0.5 | ||||
| offset_left = -56.5 | ||||
| offset_top = -19.5 | ||||
| offset_right = 56.5 | ||||
| offset_bottom = 19.5 | ||||
| text = "❓" | ||||
| horizontal_alignment = 1 | ||||
| action = &"ui_start" | ||||
| show_name = false | ||||
| event_index = 1 | ||||
| 
 | ||||
| [node name="KeyboardStartSymbol" parent="MarginContainer/VBoxContainer/PlayersContainer/MarginContainer/VBoxContainer/ScrollContainer/MarginContainer/HBoxContainer/AddPlayerButton/CenterContainer/VBoxContainer/SymbolBlinker" instance=ExtResource("4_2vecx")] | ||||
| layout_mode = 1 | ||||
| anchors_preset = 8 | ||||
| anchor_left = 0.5 | ||||
| anchor_top = 0.5 | ||||
| anchor_right = 0.5 | ||||
| anchor_bottom = 0.5 | ||||
| offset_left = -56.5 | ||||
| offset_top = -19.5 | ||||
| offset_right = 56.5 | ||||
| offset_bottom = 19.5 | ||||
| text = "❓" | ||||
| horizontal_alignment = 1 | ||||
| action = &"ui_start" | ||||
| show_name = false | ||||
| 
 | ||||
| [node name="AnimationPlayer" type="AnimationPlayer" parent="MarginContainer/VBoxContainer/PlayersContainer/MarginContainer/VBoxContainer/ScrollContainer/MarginContainer/HBoxContainer/AddPlayerButton/CenterContainer/VBoxContainer/SymbolBlinker"] | ||||
| libraries = { | ||||
| "": SubResource("AnimationLibrary_5sl0m") | ||||
| } | ||||
| autoplay = "rotate" | ||||
| 
 | ||||
| [node name="Label2" type="Label" parent="MarginContainer/VBoxContainer/PlayersContainer/MarginContainer/VBoxContainer/ScrollContainer/MarginContainer/HBoxContainer/AddPlayerButton/CenterContainer/VBoxContainer"] | ||||
| layout_mode = 2 | ||||
| text = "DM_ADD_PLAYER" | ||||
| horizontal_alignment = 1 | ||||
| 
 | ||||
| [node name="SouthEast" type="MarginContainer" parent="."] | ||||
| layout_mode = 2 | ||||
| size_flags_horizontal = 8 | ||||
| size_flags_vertical = 8 | ||||
| theme_override_constants/margin_left = 16 | ||||
| theme_override_constants/margin_top = 16 | ||||
| theme_override_constants/margin_right = 32 | ||||
| theme_override_constants/margin_bottom = 16 | ||||
| 
 | ||||
| [node name="HBoxContainer" type="HBoxContainer" parent="SouthEast"] | ||||
| layout_mode = 2 | ||||
| theme_override_constants/separation = 16 | ||||
| 
 | ||||
| [node name="Cancel" type="Button" parent="SouthEast/HBoxContainer"] | ||||
| layout_mode = 2 | ||||
| theme_type_variation = &"CancelButton" | ||||
| text = "UI_CANCEL" | ||||
| 
 | ||||
| [node name="Start" type="Button" parent="SouthEast/HBoxContainer"] | ||||
| unique_name_in_owner = true | ||||
| layout_mode = 2 | ||||
| theme_type_variation = &"AlertButton" | ||||
| text = "UI_START" | ||||
| 
 | ||||
| [connection signal="item_selected" from="MarginContainer/VBoxContainer/MapSelectContainer/MarginContainer/VBoxContainer/MapSelect" to="." method="check_start_conditions" unbinds=1] | ||||
| [connection signal="pressed" from="MarginContainer/VBoxContainer/PlayersContainer/MarginContainer/VBoxContainer/ScrollContainer/MarginContainer/HBoxContainer/AddPlayerButton" to="." method="_on_add_player_button_pressed"] | ||||
| [connection signal="pressed" from="SouthEast/HBoxContainer/Cancel" to="." method="cancel"] | ||||
| [connection signal="pressed" from="SouthEast/HBoxContainer/Start" to="." method="start"] | ||||
| @ -1,129 +0,0 @@ | ||||
| class_name PlayerSetup extends PanelContainer | ||||
| 
 | ||||
| const DEFAULT_PLAYER_NAME := "Mysterious Gfolfer X" | ||||
| 
 | ||||
| const DEFAULT_PLAYER_LIFE := 100.0 | ||||
| 
 | ||||
| const DEFAULT_PLAYER_BALLS := { | ||||
| 	GameBall.Type.BASIC: -1, | ||||
| } | ||||
| 
 | ||||
| @export var input_method: InputMethod.Type: | ||||
| 	set = _set_input_method | ||||
| 
 | ||||
| @export var player_name: String: | ||||
| 	set(value): | ||||
| 		if not is_instance_valid(name_input): | ||||
| 			await ready | ||||
| 		name_input.text = value | ||||
| 	get: | ||||
| 		return name_input.text | ||||
| 
 | ||||
| @export var player_color: Color: | ||||
| 	set(value): | ||||
| 		if not is_instance_valid(color_input): | ||||
| 			await ready | ||||
| 		color_input.color = value | ||||
| 		color_input.color_changed.emit(value) | ||||
| 	get: | ||||
| 		return color_input.color | ||||
| 
 | ||||
| var character_controller: CharacterController | ||||
| 
 | ||||
| var selected_character_index := 0: | ||||
| 	set = _set_selected_character_index | ||||
| 
 | ||||
| @onready var keyboard_symbol: Label = %KeyboardSymbol | ||||
| @onready var gamepad_symbol: Label = %GamepadSymbol | ||||
| @onready var sony_symbol: Label = %SonySymbol | ||||
| @onready var xbox_symbol: Label = %XboxSymbol | ||||
| @onready var name_input: LineEdit = %Name | ||||
| @onready var color_input: ColorPickerButton = %Color | ||||
| @onready var char_name: Label = %CharName | ||||
| @onready var character_container: Node3D = %CharacterContainer | ||||
| 
 | ||||
| # TODO genericize for selectable characters | ||||
| 
 | ||||
| 
 | ||||
| func _ready() -> void: | ||||
| 	selected_character_index = selected_character_index | ||||
| 
 | ||||
| 
 | ||||
| func _set_input_method(value: InputMethod.Type) -> void: | ||||
| 	if not is_instance_valid(keyboard_symbol): | ||||
| 		await ready | ||||
| 	keyboard_symbol.hide() | ||||
| 	gamepad_symbol.hide() | ||||
| 	sony_symbol.hide() | ||||
| 	xbox_symbol.hide() | ||||
| 
 | ||||
| 	match value: | ||||
| 		InputMethod.Type.GAMEPAD, InputMethod.Type.NINTENDO: | ||||
| 			gamepad_symbol.show() | ||||
| 		InputMethod.Type.SONY: | ||||
| 			sony_symbol.show() | ||||
| 		InputMethod.Type.XBOX: | ||||
| 			xbox_symbol.show() | ||||
| 		_:  # Assume everything else is mouse+keyboard | ||||
| 			keyboard_symbol.show() | ||||
| 
 | ||||
| 	input_method = value | ||||
| 
 | ||||
| 
 | ||||
| func _set_selected_character_index(value: int) -> void: | ||||
| 	selected_character_index = wrapi(value, 0, len(Character.catalog.characters)) | ||||
| 
 | ||||
| 	# Remove any existing character preview | ||||
| 	for child: Node in character_container.get_children(): | ||||
| 		child.queue_free() | ||||
| 
 | ||||
| 	# Get new character and instantiate preview | ||||
| 	character_controller = get_selected_character().controller_scene.instantiate() | ||||
| 
 | ||||
| 	character_container.add_child(character_controller) | ||||
| 	character_controller.set_color(player_color) | ||||
| 
 | ||||
| 
 | ||||
| func get_selected_character() -> Character: | ||||
| 	return Character.catalog.characters[selected_character_index] | ||||
| 
 | ||||
| 
 | ||||
| func select_next_character() -> void: | ||||
| 	selected_character_index += 1 | ||||
| 
 | ||||
| 
 | ||||
| func select_previous_character() -> void: | ||||
| 	selected_character_index -= 1 | ||||
| 
 | ||||
| 
 | ||||
| ## Build a `WorldPlayer` representing the selections made here. | ||||
| func build_player() -> WorldPlayer: | ||||
| 	var player := WorldPlayer.new() | ||||
| 	player.life = DEFAULT_PLAYER_LIFE | ||||
| 	player.name = player_name if player_name else DEFAULT_PLAYER_NAME | ||||
| 	player.color = player_color | ||||
| 
 | ||||
| 	# TODO club selection | ||||
| 	player.driver = Club.catalog.debug_driver | ||||
| 	player.iron = Club.catalog.debug_iron | ||||
| 	player.wedge = Club.catalog.debug_wedge | ||||
| 	player.putter = Club.catalog.debug_putter | ||||
| 	player.special = null | ||||
| 
 | ||||
| 	# TODO ball selection maybe? | ||||
| 	player._balls = DEFAULT_PLAYER_BALLS.duplicate(true) | ||||
| 
 | ||||
| 	# TODO set character selection | ||||
| 
 | ||||
| 	# TODO set input method | ||||
| 
 | ||||
| 	return player | ||||
| 
 | ||||
| 
 | ||||
| func _on_remove_button_pressed() -> void: | ||||
| 	queue_free() | ||||
| 
 | ||||
| 
 | ||||
| func _on_color_changed(color: Color) -> void: | ||||
| 	if character_controller: | ||||
| 		character_controller.set_color(color) | ||||
| @ -1,229 +0,0 @@ | ||||
| [gd_scene load_steps=12 format=3 uid="uid://cr13d4p235b5y"] | ||||
| 
 | ||||
| [ext_resource type="Script" path="res://src/ui/menus/title_screen/deathmatch_setup/player_setup/player_setup.gd" id="1_l1wxd"] | ||||
| [ext_resource type="PackedScene" uid="uid://1s3gywmoi20e" path="res://src/characters/player_characters/gfolf_girl/gfolf_girl.tscn" id="2_mj4s7"] | ||||
| [ext_resource type="Shader" path="res://src/shaders/backdrop_sky.gdshader" id="2_nak5u"] | ||||
| 
 | ||||
| [sub_resource type="CompressedTexture2D" id="CompressedTexture2D_lhni8"] | ||||
| load_path = "res://.godot/imported/grass_fairway.png-c6748aa9af191257973d3e582b17c659.ctex" | ||||
| 
 | ||||
| [sub_resource type="ShaderMaterial" id="ShaderMaterial_8q2ni"] | ||||
| shader = ExtResource("2_nak5u") | ||||
| shader_parameter/cubemap_color = Color(1, 1, 1, 1) | ||||
| shader_parameter/uv_offset = Vector2(0, 0) | ||||
| shader_parameter/uv_scale = Vector2(1, 1.391) | ||||
| shader_parameter/backdrop = SubResource("CompressedTexture2D_lhni8") | ||||
| 
 | ||||
| [sub_resource type="Sky" id="Sky_nw57n"] | ||||
| sky_material = SubResource("ShaderMaterial_8q2ni") | ||||
| 
 | ||||
| [sub_resource type="Environment" id="Environment_7vrth"] | ||||
| background_mode = 2 | ||||
| sky = SubResource("Sky_nw57n") | ||||
| ambient_light_source = 2 | ||||
| ambient_light_color = Color(1, 1, 1, 1) | ||||
| ssao_enabled = true | ||||
| ssao_intensity = 1.7 | ||||
| glow_bloom = 0.05 | ||||
| volumetric_fog_enabled = true | ||||
| volumetric_fog_density = 0.001 | ||||
| volumetric_fog_emission = Color(0.6, 1, 1, 1) | ||||
| volumetric_fog_length = 1024.0 | ||||
| volumetric_fog_sky_affect = 0.0 | ||||
| 
 | ||||
| [sub_resource type="World3D" id="World3D_u3xql"] | ||||
| environment = SubResource("Environment_7vrth") | ||||
| 
 | ||||
| [sub_resource type="Animation" id="Animation_peo4y"] | ||||
| length = 0.001 | ||||
| tracks/0/type = "value" | ||||
| tracks/0/imported = false | ||||
| tracks/0/enabled = true | ||||
| tracks/0/path = NodePath(".:rotation") | ||||
| tracks/0/interp = 1 | ||||
| tracks/0/loop_wrap = true | ||||
| tracks/0/keys = { | ||||
| "times": PackedFloat32Array(0), | ||||
| "transitions": PackedFloat32Array(1), | ||||
| "update": 0, | ||||
| "values": [Vector3(0, 0, 0)] | ||||
| } | ||||
| 
 | ||||
| [sub_resource type="Animation" id="Animation_sdxcw"] | ||||
| resource_name = "rotate" | ||||
| length = 16.0 | ||||
| loop_mode = 1 | ||||
| tracks/0/type = "value" | ||||
| tracks/0/imported = false | ||||
| tracks/0/enabled = true | ||||
| tracks/0/path = NodePath(".:rotation") | ||||
| tracks/0/interp = 1 | ||||
| tracks/0/loop_wrap = false | ||||
| tracks/0/keys = { | ||||
| "times": PackedFloat32Array(0, 16), | ||||
| "transitions": PackedFloat32Array(1, 1), | ||||
| "update": 0, | ||||
| "values": [Vector3(0, 0, 0), Vector3(0, 6.28319, 0)] | ||||
| } | ||||
| 
 | ||||
| [sub_resource type="AnimationLibrary" id="AnimationLibrary_ltul5"] | ||||
| _data = { | ||||
| "RESET": SubResource("Animation_peo4y"), | ||||
| "rotate": SubResource("Animation_sdxcw") | ||||
| } | ||||
| 
 | ||||
| [node name="PlayerSetup" type="PanelContainer"] | ||||
| custom_minimum_size = Vector2(400, 0) | ||||
| anchors_preset = 13 | ||||
| anchor_left = 0.5 | ||||
| anchor_right = 0.5 | ||||
| anchor_bottom = 1.0 | ||||
| grow_horizontal = 2 | ||||
| grow_vertical = 2 | ||||
| script = ExtResource("1_l1wxd") | ||||
| 
 | ||||
| [node name="MarginContainer" type="MarginContainer" parent="."] | ||||
| layout_mode = 2 | ||||
| theme_override_constants/margin_left = 4 | ||||
| theme_override_constants/margin_top = 4 | ||||
| theme_override_constants/margin_right = 4 | ||||
| theme_override_constants/margin_bottom = 4 | ||||
| 
 | ||||
| [node name="ScrollContainer" type="ScrollContainer" parent="MarginContainer"] | ||||
| layout_mode = 2 | ||||
| 
 | ||||
| [node name="MarginContainer" type="MarginContainer" parent="MarginContainer/ScrollContainer"] | ||||
| layout_mode = 2 | ||||
| size_flags_horizontal = 3 | ||||
| size_flags_vertical = 3 | ||||
| theme_override_constants/margin_left = 12 | ||||
| theme_override_constants/margin_top = 12 | ||||
| theme_override_constants/margin_right = 12 | ||||
| theme_override_constants/margin_bottom = 12 | ||||
| 
 | ||||
| [node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/ScrollContainer/MarginContainer"] | ||||
| layout_mode = 2 | ||||
| 
 | ||||
| [node name="KeyboardSymbol" type="Label" parent="MarginContainer/ScrollContainer/MarginContainer/VBoxContainer"] | ||||
| unique_name_in_owner = true | ||||
| layout_mode = 2 | ||||
| theme_type_variation = &"IconXL" | ||||
| text = "" | ||||
| horizontal_alignment = 1 | ||||
| 
 | ||||
| [node name="GamepadSymbol" type="Label" parent="MarginContainer/ScrollContainer/MarginContainer/VBoxContainer"] | ||||
| unique_name_in_owner = true | ||||
| visible = false | ||||
| layout_mode = 2 | ||||
| theme_type_variation = &"IconXL" | ||||
| text = "" | ||||
| horizontal_alignment = 1 | ||||
| 
 | ||||
| [node name="SonySymbol" type="Label" parent="MarginContainer/ScrollContainer/MarginContainer/VBoxContainer"] | ||||
| unique_name_in_owner = true | ||||
| visible = false | ||||
| layout_mode = 2 | ||||
| theme_type_variation = &"IconXL" | ||||
| text = "⑀" | ||||
| horizontal_alignment = 1 | ||||
| 
 | ||||
| [node name="XboxSymbol" type="Label" parent="MarginContainer/ScrollContainer/MarginContainer/VBoxContainer"] | ||||
| unique_name_in_owner = true | ||||
| visible = false | ||||
| layout_mode = 2 | ||||
| theme_type_variation = &"IconXL" | ||||
| text = "⑂" | ||||
| horizontal_alignment = 1 | ||||
| 
 | ||||
| [node name="NameAndColor" type="HBoxContainer" parent="MarginContainer/ScrollContainer/MarginContainer/VBoxContainer"] | ||||
| layout_mode = 2 | ||||
| 
 | ||||
| [node name="Name" type="LineEdit" parent="MarginContainer/ScrollContainer/MarginContainer/VBoxContainer/NameAndColor"] | ||||
| unique_name_in_owner = true | ||||
| layout_mode = 2 | ||||
| size_flags_horizontal = 3 | ||||
| theme_type_variation = &"PlayerNameInput" | ||||
| text = "Gfolfer" | ||||
| placeholder_text = "DM_NAME_PLACEHOLDER" | ||||
| alignment = 1 | ||||
| 
 | ||||
| [node name="Color" type="ColorPickerButton" parent="MarginContainer/ScrollContainer/MarginContainer/VBoxContainer/NameAndColor"] | ||||
| unique_name_in_owner = true | ||||
| custom_minimum_size = Vector2(64, 64) | ||||
| layout_mode = 2 | ||||
| edit_alpha = false | ||||
| 
 | ||||
| [node name="CharacterSelectContainer" type="VBoxContainer" parent="MarginContainer/ScrollContainer/MarginContainer/VBoxContainer"] | ||||
| layout_mode = 2 | ||||
| 
 | ||||
| [node name="SubViewportContainer" type="SubViewportContainer" parent="MarginContainer/ScrollContainer/MarginContainer/VBoxContainer/CharacterSelectContainer"] | ||||
| layout_mode = 2 | ||||
| 
 | ||||
| [node name="SubViewport" type="SubViewport" parent="MarginContainer/ScrollContainer/MarginContainer/VBoxContainer/CharacterSelectContainer/SubViewportContainer"] | ||||
| own_world_3d = true | ||||
| world_3d = SubResource("World3D_u3xql") | ||||
| handle_input_locally = false | ||||
| msaa_3d = 3 | ||||
| screen_space_aa = 1 | ||||
| use_taa = true | ||||
| use_debanding = true | ||||
| size = Vector2i(368, 512) | ||||
| render_target_update_mode = 4 | ||||
| 
 | ||||
| [node name="CharacterPreview" type="Node3D" parent="MarginContainer/ScrollContainer/MarginContainer/VBoxContainer/CharacterSelectContainer/SubViewportContainer/SubViewport"] | ||||
| 
 | ||||
| [node name="CharacterPivot" type="Node3D" parent="MarginContainer/ScrollContainer/MarginContainer/VBoxContainer/CharacterSelectContainer/SubViewportContainer/SubViewport/CharacterPreview"] | ||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.75, 0) | ||||
| 
 | ||||
| [node name="CharacterContainer" type="Node3D" parent="MarginContainer/ScrollContainer/MarginContainer/VBoxContainer/CharacterSelectContainer/SubViewportContainer/SubViewport/CharacterPreview/CharacterPivot"] | ||||
| unique_name_in_owner = true | ||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.365) | ||||
| 
 | ||||
| [node name="GfolfGirl" parent="MarginContainer/ScrollContainer/MarginContainer/VBoxContainer/CharacterSelectContainer/SubViewportContainer/SubViewport/CharacterPreview/CharacterPivot/CharacterContainer" instance=ExtResource("2_mj4s7")] | ||||
| unique_name_in_owner = true | ||||
| 
 | ||||
| [node name="AnimationPlayer" type="AnimationPlayer" parent="MarginContainer/ScrollContainer/MarginContainer/VBoxContainer/CharacterSelectContainer/SubViewportContainer/SubViewport/CharacterPreview/CharacterPivot"] | ||||
| libraries = { | ||||
| "": SubResource("AnimationLibrary_ltul5") | ||||
| } | ||||
| autoplay = "rotate" | ||||
| 
 | ||||
| [node name="Camera3D" type="Camera3D" parent="MarginContainer/ScrollContainer/MarginContainer/VBoxContainer/CharacterSelectContainer/SubViewportContainer/SubViewport/CharacterPreview"] | ||||
| transform = Transform3D(0.999889, 0.00165718, -0.0147791, 0, 0.993772, 0.111432, 0.0148717, -0.11142, 0.993662, -0.0147003, 0.232996, 1.68475) | ||||
| 
 | ||||
| [node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/ScrollContainer/MarginContainer/VBoxContainer/CharacterSelectContainer"] | ||||
| layout_mode = 2 | ||||
| 
 | ||||
| [node name="PrevCharButton" type="Button" parent="MarginContainer/ScrollContainer/MarginContainer/VBoxContainer/CharacterSelectContainer/HBoxContainer"] | ||||
| layout_mode = 2 | ||||
| theme_type_variation = &"CharSelectButton" | ||||
| text = "<" | ||||
| 
 | ||||
| [node name="CharName" type="Label" parent="MarginContainer/ScrollContainer/MarginContainer/VBoxContainer/CharacterSelectContainer/HBoxContainer"] | ||||
| unique_name_in_owner = true | ||||
| custom_minimum_size = Vector2(240, 0) | ||||
| layout_mode = 2 | ||||
| size_flags_horizontal = 3 | ||||
| theme_type_variation = &"InputPrompt" | ||||
| text = "Character" | ||||
| horizontal_alignment = 1 | ||||
| autowrap_mode = 2 | ||||
| 
 | ||||
| [node name="NextCharButton" type="Button" parent="MarginContainer/ScrollContainer/MarginContainer/VBoxContainer/CharacterSelectContainer/HBoxContainer"] | ||||
| layout_mode = 2 | ||||
| theme_type_variation = &"CharSelectButton" | ||||
| text = ">" | ||||
| 
 | ||||
| [node name="RemoveButton" type="Button" parent="MarginContainer/ScrollContainer/MarginContainer"] | ||||
| layout_mode = 2 | ||||
| size_flags_horizontal = 8 | ||||
| size_flags_vertical = 0 | ||||
| theme_type_variation = &"IconButton" | ||||
| theme_override_colors/font_color = Color(0.819608, 0.196078, 0.196078, 1) | ||||
| text = "✗" | ||||
| flat = true | ||||
| 
 | ||||
| [connection signal="color_changed" from="MarginContainer/ScrollContainer/MarginContainer/VBoxContainer/NameAndColor/Color" to="." method="_on_color_changed"] | ||||
| [connection signal="pressed" from="MarginContainer/ScrollContainer/MarginContainer/VBoxContainer/CharacterSelectContainer/HBoxContainer/PrevCharButton" to="." method="select_next_character"] | ||||
| [connection signal="pressed" from="MarginContainer/ScrollContainer/MarginContainer/VBoxContainer/CharacterSelectContainer/HBoxContainer/NextCharButton" to="." method="select_previous_character"] | ||||
| [connection signal="pressed" from="MarginContainer/ScrollContainer/MarginContainer/RemoveButton" to="." method="_on_remove_button_pressed"] | ||||
| @ -1,71 +0,0 @@ | ||||
| class_name TitleScreen extends Control | ||||
| 
 | ||||
| const SCENE := "res://src/ui/menus/title_screen/title_screen.tscn" | ||||
| 
 | ||||
| @export var settings_scene: PackedScene | ||||
| @export var local_deathmatch_setup_scene: PackedScene | ||||
| 
 | ||||
| @onready var menu: Control = %Menu | ||||
| @onready var settings_container: MarginContainer = %SettingsContainer | ||||
| @onready var deathmatch_setup_container: MarginContainer = %DeathmatchSetupContainer | ||||
| 
 | ||||
| @onready var state_machine: AnimationTree = $Menu/MenuStateMachine | ||||
| @onready var menu_state: AnimationNodeStateMachinePlayback = state_machine["parameters/playback"] | ||||
| 
 | ||||
| @onready var confirm_sfx: AudioStreamPlayer = %ConfirmSFX | ||||
| 
 | ||||
| 
 | ||||
| func play_chime() -> void: | ||||
| 	confirm_sfx.play() | ||||
| 
 | ||||
| 
 | ||||
| func _input(event: InputEvent) -> void: | ||||
| 	if event is InputEventKey or event is InputEventJoypadButton or event is InputEventMouseButton: | ||||
| 		if menu_state.get_current_node() in ["press_start_fade_in", "press_start_idle"]: | ||||
| 			_to_main_menu() | ||||
| 
 | ||||
| 
 | ||||
| func _unhide() -> void: | ||||
| 	menu.show() | ||||
| 
 | ||||
| 
 | ||||
| func _hide() -> void: | ||||
| 	menu.hide() | ||||
| 
 | ||||
| 
 | ||||
| func _to_main_menu() -> void: | ||||
| 	menu_state.travel("main_idle") | ||||
| 
 | ||||
| 
 | ||||
| func _to_single_player() -> void: | ||||
| 	menu_state.travel("single_player_idle") | ||||
| 
 | ||||
| 
 | ||||
| func _to_multi_player() -> void: | ||||
| 	menu_state.travel("multi_player_idle") | ||||
| 
 | ||||
| 
 | ||||
| func _to_local_multi() -> void: | ||||
| 	menu_state.travel("local_idle") | ||||
| 
 | ||||
| 
 | ||||
| func _to_network_multi() -> void: | ||||
| 	menu_state.travel("network_idle") | ||||
| 
 | ||||
| 
 | ||||
| func _on_quit() -> void: | ||||
| 	get_tree().root.propagate_notification(NOTIFICATION_WM_CLOSE_REQUEST) | ||||
| 
 | ||||
| 
 | ||||
| func _open_settings() -> void: | ||||
| 	var instance: Control = settings_scene.instantiate() | ||||
| 	settings_container.add_child(instance) | ||||
| 	instance.tree_exited.connect(_unhide) | ||||
| 	_hide() | ||||
| 
 | ||||
| 
 | ||||
| func _open_local_deathmatch_setup() -> void: | ||||
| 	var instance: Control = local_deathmatch_setup_scene.instantiate() | ||||
| 	deathmatch_setup_container.add_child(instance) | ||||
| 	instance.tree_exited.connect(_unhide) | ||||
| 	_hide() | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -46,7 +46,7 @@ custom_minimum_size = Vector2(120, 0) | ||||
| layout_mode = 0 | ||||
| offset_top = 50.0 | ||||
| offset_right = 120.0 | ||||
| offset_bottom = 205.0 | ||||
| offset_bottom = 173.0 | ||||
| theme_override_constants/separation = 5 | ||||
| 
 | ||||
| [node name="BasicIcon" parent="GradientMask/BallList" instance=ExtResource("1_1v8xg")] | ||||
|  | ||||
| @ -1,45 +0,0 @@ | ||||
| class_name InputMethod | ||||
| ## Tools for disambiguating game input methods. | ||||
| 
 | ||||
| enum Type { | ||||
| 	UNKNOWN, | ||||
| 	MOUSE_KEYBOARD, | ||||
| 	GAMEPAD, | ||||
| 	SONY, | ||||
| 	XBOX, | ||||
| 	NINTENDO, | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| static func _get_gamepad_type(device_id: int) -> Type: | ||||
| 	var name := Input.get_joy_name(device_id) | ||||
| 	if name.contains("Nintendo Switch"): | ||||
| 		return Type.NINTENDO | ||||
| 	if name.contains("Xbox"): | ||||
| 		return Type.XBOX | ||||
| 	# rpk: If you see this and think "HA! I could replace that with one simple regex!"... | ||||
| 	# ... buy me a beer sometime and ask me about the User Agent Regex. | ||||
| 	if ( | ||||
| 		name.contains("PlayStation") | ||||
| 		or name.contains("PS1") | ||||
| 		or name.contains("PS2") | ||||
| 		or name.contains("PS3") | ||||
| 		or name.contains("PS4") | ||||
| 		or name.contains("PS5") | ||||
| 	): | ||||
| 		return Type.SONY | ||||
| 
 | ||||
| 	return Type.GAMEPAD | ||||
| 
 | ||||
| 
 | ||||
| static func get_method(event: InputEvent) -> Type: | ||||
| 	if event is InputEventKey or event is InputEventMouse: | ||||
| 		return Type.MOUSE_KEYBOARD | ||||
| 
 | ||||
| 	if event is InputEventJoypadButton: | ||||
| 		return _get_gamepad_type((event as InputEventJoypadButton).device) | ||||
| 
 | ||||
| 	if event is InputEventJoypadMotion: | ||||
| 		return _get_gamepad_type((event as InputEventJoypadMotion).device) | ||||
| 
 | ||||
| 	return Type.UNKNOWN | ||||
| @ -1,16 +0,0 @@ | ||||
| class_name Level extends Resource | ||||
| ## Container for a level scene & associated data. | ||||
| 
 | ||||
| ## Scene file of this level. | ||||
| @export var scene: PackedScene | ||||
| 
 | ||||
| ## Name of the level (or corresponding i18n key) | ||||
| @export var level_name: String | ||||
| 
 | ||||
| ## Preview image for the level. Will be used for thumbnails. | ||||
| @export var preview: Texture2D | ||||
| 
 | ||||
| ## Global typesafe accessor for level catalog | ||||
| static var catalog: LevelCatalogType: | ||||
| 	get: | ||||
| 		return LevelCatalog | ||||
| @ -1,4 +0,0 @@ | ||||
| class_name LevelCatalogType extends Node | ||||
| ## Provides access to levels. | ||||
| 
 | ||||
| @export var levels: Array[Level] | ||||
| @ -1,9 +0,0 @@ | ||||
| [gd_scene load_steps=4 format=3 uid="uid://cdtdvka0bssgy"] | ||||
| 
 | ||||
| [ext_resource type="Script" path="res://src/world/level/level_catalog.gd" id="1_wjjeu"] | ||||
| [ext_resource type="Resource" uid="uid://chewry1b1a28j" path="res://levels/debug_level/debug_island.tres" id="3_3eqbc"] | ||||
| [ext_resource type="Script" path="res://src/world/level/level.gd" id="3_8lfqu"] | ||||
| 
 | ||||
| [node name="LevelCatalog" type="Node"] | ||||
| script = ExtResource("1_wjjeu") | ||||
| levels = Array[ExtResource("3_8lfqu")]([ExtResource("3_3eqbc")]) | ||||
| @ -4,7 +4,7 @@ class_name World extends Node | ||||
| ## A world contains player(s) and the active level, manages player states, | ||||
| ## and transitions between active levels. | ||||
| 
 | ||||
| @export var initial_level: PackedScene | ||||
| @export var initial_level: PackedScene = load("res://levels/debug_level/debug_level.tscn") | ||||
| 
 | ||||
| @export var manager: PlayManager | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user