generated from krampus/template-godot4
	Compare commits
	
		
			No commits in common. "6abbe7f82a0b85ee3df697cdcf1abe02a6718719" and "ba7d0024f61e4dd8c84b79b55c1dd8c7b4b433d4" have entirely different histories.
		
	
	
		
			6abbe7f82a
			...
			ba7d0024f6
		
	
		
							
								
								
									
										
											BIN
										
									
								
								asset_dev/balls/plasma_ball.png
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								asset_dev/balls/plasma_ball.png
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								asset_dev/balls/plasma_ball_xl.png
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								asset_dev/balls/plasma_ball_xl.png
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								asset_dev/item_octahedron/item_octahedron.blend
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								asset_dev/item_octahedron/item_octahedron.blend
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							| @ -1,26 +0,0 @@ | |||||||
| [gd_resource type="ShaderMaterial" load_steps=4 format=3 uid="uid://c5hidbq5gbmr"] |  | ||||||
| 
 |  | ||||||
| [ext_resource type="Shader" path="res://src/shaders/frosted_glass.gdshader" id="1_iki28"] |  | ||||||
| [ext_resource type="Texture2D" uid="uid://c2p2in2p7mjyo" path="res://assets/materials/crystal_noise_normal_map.tres" id="2_cvxma"] |  | ||||||
| [ext_resource type="Texture2D" uid="uid://cx33n4h5mfcdb" path="res://assets/materials/crystal_noise_map.tres" id="3_v8v67"] |  | ||||||
| 
 |  | ||||||
| [resource] |  | ||||||
| render_priority = 0 |  | ||||||
| shader = ExtResource("1_iki28") |  | ||||||
| shader_parameter/albedo = Color(0.5146, 0.62, 0.62, 0.0392157) |  | ||||||
| shader_parameter/roughness = 0.3 |  | ||||||
| shader_parameter/roughness_texture = ExtResource("3_v8v67") |  | ||||||
| shader_parameter/refraction = 0.0100008 |  | ||||||
| shader_parameter/refraction_texture_channel = Vector4(1, 0, 0, 0) |  | ||||||
| shader_parameter/texture_refraction = ExtResource("3_v8v67") |  | ||||||
| shader_parameter/normal_strength = 0.400001 |  | ||||||
| shader_parameter/normal_map = ExtResource("2_cvxma") |  | ||||||
| shader_parameter/subsurface_scattering_strength = 1.0 |  | ||||||
| shader_parameter/texture_subsurface_scattering = ExtResource("3_v8v67") |  | ||||||
| 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) |  | ||||||
| @ -1,5 +0,0 @@ | |||||||
| [gd_resource type="FastNoiseLite" format=3 uid="uid://637qo4uj5mk"] |  | ||||||
| 
 |  | ||||||
| [resource] |  | ||||||
| seed = 2 |  | ||||||
| fractal_octaves = 3 |  | ||||||
| @ -1,9 +0,0 @@ | |||||||
| [gd_resource type="NoiseTexture2D" load_steps=2 format=3 uid="uid://cx33n4h5mfcdb"] |  | ||||||
| 
 |  | ||||||
| [ext_resource type="FastNoiseLite" uid="uid://637qo4uj5mk" path="res://assets/materials/crystal_noise.tres" id="1_wv67w"] |  | ||||||
| 
 |  | ||||||
| [resource] |  | ||||||
| width = 1024 |  | ||||||
| height = 1024 |  | ||||||
| seamless = true |  | ||||||
| noise = ExtResource("1_wv67w") |  | ||||||
| @ -1,10 +0,0 @@ | |||||||
| [gd_resource type="NoiseTexture2D" load_steps=2 format=3 uid="uid://c2p2in2p7mjyo"] |  | ||||||
| 
 |  | ||||||
| [ext_resource type="FastNoiseLite" uid="uid://637qo4uj5mk" path="res://assets/materials/crystal_noise.tres" id="1_lwomp"] |  | ||||||
| 
 |  | ||||||
| [resource] |  | ||||||
| width = 1024 |  | ||||||
| height = 1024 |  | ||||||
| seamless = true |  | ||||||
| as_normal_map = true |  | ||||||
| noise = ExtResource("1_lwomp") |  | ||||||
| @ -41,6 +41,5 @@ shader_parameter/edge_color = Color(0, 0, 0, 1) | |||||||
| shader_parameter/surface_contribution = 0.9 | shader_parameter/surface_contribution = 0.9 | ||||||
| shader_parameter/specular_contribution = 20.0 | shader_parameter/specular_contribution = 20.0 | ||||||
| shader_parameter/refraction_contribution = 3.0 | shader_parameter/refraction_contribution = 3.0 | ||||||
| shader_parameter/alpha = 1.0 |  | ||||||
| shader_parameter/uv1_scale = Vector3(1, 1, 1) | shader_parameter/uv1_scale = Vector3(1, 1, 1) | ||||||
| shader_parameter/uv1_offset = Vector3(0, 0, 0) | shader_parameter/uv1_offset = Vector3(0, 0, 0) | ||||||
|  | |||||||
| @ -1,11 +0,0 @@ | |||||||
| [gd_resource type="StandardMaterial3D" load_steps=3 format=3 uid="uid://f3qufrkoiv66"] |  | ||||||
| 
 |  | ||||||
| [ext_resource type="Texture2D" uid="uid://b7mexqu466hll" path="res://assets/textures/plasma_ball/plasma_ball.png" id="1_c5njv"] |  | ||||||
| [ext_resource type="Texture2D" uid="uid://bde62x0qlefmp" path="res://assets/textures/plasma_ball/plasma_ball_normal_map.png" id="2_1ari2"] |  | ||||||
| 
 |  | ||||||
| [resource] |  | ||||||
| albedo_texture = ExtResource("1_c5njv") |  | ||||||
| normal_enabled = true |  | ||||||
| normal_texture = ExtResource("2_1ari2") |  | ||||||
| uv1_scale = Vector3(2, 1, 2) |  | ||||||
| texture_filter = 2 |  | ||||||
										
											Binary file not shown.
										
									
								
							| @ -1,104 +0,0 @@ | |||||||
| { |  | ||||||
| 	"asset":{ |  | ||||||
| 		"generator":"Khronos glTF Blender I/O v4.2.60", |  | ||||||
| 		"version":"2.0" |  | ||||||
| 	}, |  | ||||||
| 	"scene":0, |  | ||||||
| 	"scenes":[ |  | ||||||
| 		{ |  | ||||||
| 			"name":"Scene", |  | ||||||
| 			"nodes":[ |  | ||||||
| 				0 |  | ||||||
| 			] |  | ||||||
| 		} |  | ||||||
| 	], |  | ||||||
| 	"nodes":[ |  | ||||||
| 		{ |  | ||||||
| 			"mesh":0, |  | ||||||
| 			"name":"Octahedron" |  | ||||||
| 		} |  | ||||||
| 	], |  | ||||||
| 	"meshes":[ |  | ||||||
| 		{ |  | ||||||
| 			"name":"Cube.002", |  | ||||||
| 			"primitives":[ |  | ||||||
| 				{ |  | ||||||
| 					"attributes":{ |  | ||||||
| 						"POSITION":0, |  | ||||||
| 						"NORMAL":1, |  | ||||||
| 						"TEXCOORD_0":2 |  | ||||||
| 					}, |  | ||||||
| 					"indices":3 |  | ||||||
| 				} |  | ||||||
| 			] |  | ||||||
| 		} |  | ||||||
| 	], |  | ||||||
| 	"accessors":[ |  | ||||||
| 		{ |  | ||||||
| 			"bufferView":0, |  | ||||||
| 			"componentType":5126, |  | ||||||
| 			"count":44, |  | ||||||
| 			"max":[ |  | ||||||
| 				1, |  | ||||||
| 				1, |  | ||||||
| 				1 |  | ||||||
| 			], |  | ||||||
| 			"min":[ |  | ||||||
| 				-1, |  | ||||||
| 				-1, |  | ||||||
| 				-1 |  | ||||||
| 			], |  | ||||||
| 			"type":"VEC3" |  | ||||||
| 		}, |  | ||||||
| 		{ |  | ||||||
| 			"bufferView":1, |  | ||||||
| 			"componentType":5126, |  | ||||||
| 			"count":44, |  | ||||||
| 			"type":"VEC3" |  | ||||||
| 		}, |  | ||||||
| 		{ |  | ||||||
| 			"bufferView":2, |  | ||||||
| 			"componentType":5126, |  | ||||||
| 			"count":44, |  | ||||||
| 			"type":"VEC2" |  | ||||||
| 		}, |  | ||||||
| 		{ |  | ||||||
| 			"bufferView":3, |  | ||||||
| 			"componentType":5123, |  | ||||||
| 			"count":132, |  | ||||||
| 			"type":"SCALAR" |  | ||||||
| 		} |  | ||||||
| 	], |  | ||||||
| 	"bufferViews":[ |  | ||||||
| 		{ |  | ||||||
| 			"buffer":0, |  | ||||||
| 			"byteLength":528, |  | ||||||
| 			"byteOffset":0, |  | ||||||
| 			"target":34962 |  | ||||||
| 		}, |  | ||||||
| 		{ |  | ||||||
| 			"buffer":0, |  | ||||||
| 			"byteLength":528, |  | ||||||
| 			"byteOffset":528, |  | ||||||
| 			"target":34962 |  | ||||||
| 		}, |  | ||||||
| 		{ |  | ||||||
| 			"buffer":0, |  | ||||||
| 			"byteLength":352, |  | ||||||
| 			"byteOffset":1056, |  | ||||||
| 			"target":34962 |  | ||||||
| 		}, |  | ||||||
| 		{ |  | ||||||
| 			"buffer":0, |  | ||||||
| 			"byteLength":264, |  | ||||||
| 			"byteOffset":1408, |  | ||||||
| 			"target":34963 |  | ||||||
| 		} |  | ||||||
| 	], |  | ||||||
| 	"buffers":[ |  | ||||||
| 		{ |  | ||||||
| 			"byteLength":1672, |  | ||||||
| 			"uri":"octahedron.bin" |  | ||||||
| 		} |  | ||||||
| 	] |  | ||||||
| } |  | ||||||
| @ -1,36 +0,0 @@ | |||||||
| [remap] |  | ||||||
| 
 |  | ||||||
| importer="scene" |  | ||||||
| importer_version=1 |  | ||||||
| type="PackedScene" |  | ||||||
| uid="uid://djfbit4v0qncc" |  | ||||||
| path="res://.godot/imported/octahedron.gltf-966cdbfd42ea420a19b9a9427efc8ac9.scn" |  | ||||||
| 
 |  | ||||||
| [deps] |  | ||||||
| 
 |  | ||||||
| source_file="res://assets/models/items/octahedron.gltf" |  | ||||||
| dest_files=["res://.godot/imported/octahedron.gltf-966cdbfd42ea420a19b9a9427efc8ac9.scn"] |  | ||||||
| 
 |  | ||||||
| [params] |  | ||||||
| 
 |  | ||||||
| nodes/root_type="" |  | ||||||
| nodes/root_name="" |  | ||||||
| nodes/apply_root_scale=true |  | ||||||
| nodes/root_scale=1.0 |  | ||||||
| nodes/import_as_skeleton_bones=false |  | ||||||
| meshes/ensure_tangents=true |  | ||||||
| meshes/generate_lods=true |  | ||||||
| meshes/create_shadow_meshes=true |  | ||||||
| meshes/light_baking=1 |  | ||||||
| meshes/lightmap_texel_size=0.2 |  | ||||||
| meshes/force_disable_compression=false |  | ||||||
| skins/use_named_skins=true |  | ||||||
| animation/import=true |  | ||||||
| animation/fps=30 |  | ||||||
| animation/trimming=false |  | ||||||
| animation/remove_immutable_tracks=true |  | ||||||
| animation/import_rest_as_RESET=false |  | ||||||
| import_script/path="" |  | ||||||
| _subresources={} |  | ||||||
| gltf/naming_version=1 |  | ||||||
| gltf/embedded_image_handling=1 |  | ||||||
							
								
								
									
										
											BIN
										
									
								
								assets/textures/plasma_ball/plasma_ball.png
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/textures/plasma_ball/plasma_ball.png
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							| @ -1,34 +0,0 @@ | |||||||
| [remap] |  | ||||||
| 
 |  | ||||||
| importer="texture" |  | ||||||
| type="CompressedTexture2D" |  | ||||||
| uid="uid://b7mexqu466hll" |  | ||||||
| path="res://.godot/imported/plasma_ball.png-c4d5acfe04b6c104fde28d019cb35275.ctex" |  | ||||||
| metadata={ |  | ||||||
| "vram_texture": false |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| [deps] |  | ||||||
| 
 |  | ||||||
| source_file="res://assets/textures/plasma_ball/plasma_ball.png" |  | ||||||
| dest_files=["res://.godot/imported/plasma_ball.png-c4d5acfe04b6c104fde28d019cb35275.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=0 |  | ||||||
							
								
								
									
										
											BIN
										
									
								
								assets/textures/plasma_ball/plasma_ball_normal_map.png
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/textures/plasma_ball/plasma_ball_normal_map.png
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							| @ -1,34 +0,0 @@ | |||||||
| [remap] |  | ||||||
| 
 |  | ||||||
| importer="texture" |  | ||||||
| type="CompressedTexture2D" |  | ||||||
| uid="uid://bde62x0qlefmp" |  | ||||||
| path="res://.godot/imported/plasma_ball_normal_map.png-119be068fc77a5110385979340f31349.ctex" |  | ||||||
| metadata={ |  | ||||||
| "vram_texture": false |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| [deps] |  | ||||||
| 
 |  | ||||||
| source_file="res://assets/textures/plasma_ball/plasma_ball_normal_map.png" |  | ||||||
| dest_files=["res://.godot/imported/plasma_ball_normal_map.png-119be068fc77a5110385979340f31349.ctex"] |  | ||||||
| 
 |  | ||||||
| [params] |  | ||||||
| 
 |  | ||||||
| compress/mode=0 |  | ||||||
| compress/high_quality=false |  | ||||||
| compress/lossy_quality=0.7 |  | ||||||
| compress/hdr_compression=1 |  | ||||||
| compress/normal_map=1 |  | ||||||
| compress/channel_pack=0 |  | ||||||
| mipmaps/generate=true |  | ||||||
| mipmaps/limit=-1 |  | ||||||
| roughness/mode=1 |  | ||||||
| roughness/src_normal="res://assets/textures/plasma_ball/plasma_ball_normal_map.png" |  | ||||||
| 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=0 |  | ||||||
| @ -1,19 +1,16 @@ | |||||||
| [gd_scene load_steps=65 format=3 uid="uid://bm2o3mex10v11"] | [gd_scene load_steps=62 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="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"] | [ext_resource type="Shader" path="res://src/shaders/psx_water.gdshader" id="6_0efu4"] | ||||||
| [ext_resource type="Texture2D" uid="uid://c47ern0l2d50r" path="res://assets/vista_2.png" id="6_ectru"] | [ext_resource type="Texture2D" uid="uid://c47ern0l2d50r" path="res://assets/vista_2.png" id="6_ectru"] | ||||||
| [ext_resource type="Texture2D" uid="uid://con5a36t6n6sq" path="res://assets/textures/clear_sea_water_2048x2048.png" id="7_t86h2"] | [ext_resource type="Texture2D" uid="uid://con5a36t6n6sq" path="res://assets/textures/clear_sea_water_2048x2048.png" id="7_t86h2"] | ||||||
| [ext_resource type="Script" path="res://src/items/item_spawner.gd" id="8_5kaye"] |  | ||||||
| [ext_resource type="Script" path="res://src/world/ball_zone/ball_zone.gd" id="9_jwlau"] | [ext_resource type="Script" path="res://src/world/ball_zone/ball_zone.gd" id="9_jwlau"] | ||||||
|  | [ext_resource type="PackedScene" uid="uid://1s3gywmoi20e" path="res://src/characters/player_characters/gfolf_girl/gfolf_girl.tscn" id="10_8tu3b"] | ||||||
| [ext_resource type="PackedScene" uid="uid://dagh38vap4t1d" path="res://src/props/scenery/city/concrete_building_1.tscn" id="10_lf15j"] | [ext_resource type="PackedScene" uid="uid://dagh38vap4t1d" path="res://src/props/scenery/city/concrete_building_1.tscn" id="10_lf15j"] | ||||||
| [ext_resource type="PackedScene" uid="uid://cjubxs7peir5k" path="res://src/props/scenery/city/kana_signboard.tscn" id="11_evxup"] | [ext_resource type="PackedScene" uid="uid://cjubxs7peir5k" path="res://src/props/scenery/city/kana_signboard.tscn" id="11_evxup"] | ||||||
| [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://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://c7l58wuuahn7w" path="res://src/props/flag/flag.tscn" id="13_6jtao"] | ||||||
| [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://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"] |  | ||||||
| [ext_resource type="PackedScene" uid="uid://dwfckgdxnwwru" path="res://src/world/effects/zephyr/zephyr_particle.tscn" id="16_2kyww"] | [ext_resource type="PackedScene" uid="uid://dwfckgdxnwwru" path="res://src/world/effects/zephyr/zephyr_particle.tscn" id="16_2kyww"] | ||||||
| [ext_resource type="Texture2D" uid="uid://du3vk5nnksohs" path="res://assets/sprites/particles/sparkle.png" id="16_2m5yu"] | [ext_resource type="Texture2D" uid="uid://du3vk5nnksohs" path="res://assets/sprites/particles/sparkle.png" id="16_2m5yu"] | ||||||
| [ext_resource type="Shader" path="res://src/shaders/frosted_glass.gdshader" id="16_rat2n"] | [ext_resource type="Shader" path="res://src/shaders/frosted_glass.gdshader" id="16_rat2n"] | ||||||
| @ -220,7 +217,6 @@ shader_parameter/edge_color = Color(0, 0, 0, 1) | |||||||
| shader_parameter/surface_contribution = 6.655 | shader_parameter/surface_contribution = 6.655 | ||||||
| shader_parameter/specular_contribution = 2.0 | shader_parameter/specular_contribution = 2.0 | ||||||
| shader_parameter/refraction_contribution = 30.0 | shader_parameter/refraction_contribution = 30.0 | ||||||
| shader_parameter/alpha = 1.0 |  | ||||||
| shader_parameter/uv1_scale = Vector3(1, 1, 1) | shader_parameter/uv1_scale = Vector3(1, 1, 1) | ||||||
| shader_parameter/uv1_offset = Vector3(0, 0, 0) | shader_parameter/uv1_offset = Vector3(0, 0, 0) | ||||||
| 
 | 
 | ||||||
| @ -356,45 +352,6 @@ transform = Transform3D(-0.74629, 0, -0.665621, 0, 1, 0, 0.665621, 0, -0.74629, | |||||||
| [node name="Flag" parent="Course" instance=ExtResource("13_6jtao")] | [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) | transform = Transform3D(-0.777146, 0, -0.629321, 0, 1, 0, 0.629321, 0, -0.777146, 540, 4, 452) | ||||||
| 
 | 
 | ||||||
| [node name="TestSpawners" type="Node3D" parent="Course"] |  | ||||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 228.164, 4, 274.211) |  | ||||||
| 
 |  | ||||||
| [node name="ItemSpawner" type="Marker3D" parent="Course/TestSpawners"] |  | ||||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16.5034, 1.1, 12.0222) |  | ||||||
| script = ExtResource("8_5kaye") |  | ||||||
| item = ExtResource("13_ydvlu") |  | ||||||
| spawn_time = 5.0 |  | ||||||
| 
 |  | ||||||
| [node name="ItemSpawner2" type="Marker3D" parent="Course/TestSpawners"] |  | ||||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -14.1577, 1.1, 9.89978) |  | ||||||
| script = ExtResource("8_5kaye") |  | ||||||
| item = ExtResource("13_ydvlu") |  | ||||||
| spawn_on_ready = true |  | ||||||
| spawn_turns = 1 |  | ||||||
| 
 |  | ||||||
| [node name="ItemSpawner3" type="Marker3D" parent="Course/TestSpawners"] |  | ||||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -11.9586, 1.1, 7.47653) |  | ||||||
| script = ExtResource("8_5kaye") |  | ||||||
| item = ExtResource("13_ydvlu") |  | ||||||
| one_shot = true |  | ||||||
| spawn_turns = 2 |  | ||||||
| 
 |  | ||||||
| [node name="BrickSpawner" type="Marker3D" parent="Course/TestSpawners"] |  | ||||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.54289, 1.1, 4.28708) |  | ||||||
| script = ExtResource("8_5kaye") |  | ||||||
| item = ExtResource("12_tj0lh") |  | ||||||
| amount = 5 |  | ||||||
| spawn_on_ready = true |  | ||||||
| spawn_turns = 1 |  | ||||||
| 
 |  | ||||||
| [node name="PlasmaBallSpawner" type="Marker3D" parent="Course/TestSpawners"] |  | ||||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8.02452, 1.1, 5.12384) |  | ||||||
| script = ExtResource("8_5kaye") |  | ||||||
| item = ExtResource("15_ir4ss") |  | ||||||
| amount = 5 |  | ||||||
| spawn_on_ready = true |  | ||||||
| spawn_turns = 1 |  | ||||||
| 
 |  | ||||||
| [node name="PlayerSpawn1" type="Marker3D" parent="Course" groups=["PlayerSpawn"]] | [node name="PlayerSpawn1" type="Marker3D" parent="Course" groups=["PlayerSpawn"]] | ||||||
| transform = Transform3D(-0.842697, 0, -0.538388, 0, 1, 0, 0.538388, 0, -0.842697, 212.717, 4, 294.073) | transform = Transform3D(-0.842697, 0, -0.538388, 0, 1, 0, 0.538388, 0, -0.842697, 212.717, 4, 294.073) | ||||||
| 
 | 
 | ||||||
| @ -423,13 +380,8 @@ draw_pass_1 = SubResource("QuadMesh_l4j8a") | |||||||
| [node name="DemoCamera" type="Camera3D" parent="Course" groups=["DemoCamera"]] | [node name="DemoCamera" type="Camera3D" parent="Course" groups=["DemoCamera"]] | ||||||
| transform = Transform3D(-0.734269, 0.305072, -0.606448, 0, 0.893336, 0.44939, 0.678858, 0.329973, -0.655949, 143.463, 90.0707, 223.738) | transform = Transform3D(-0.734269, 0.305072, -0.606448, 0, 0.893336, 0.44939, 0.678858, 0.329973, -0.655949, 143.463, 90.0707, 223.738) | ||||||
| 
 | 
 | ||||||
| [node name="BrickItemSpawner" type="Marker3D" parent="Course"] | [node name="GfolfGirl" parent="Course" instance=ExtResource("10_8tu3b")] | ||||||
| transform = Transform3D(0.909686, 0, 0.415297, 0, 1, 0, -0.415297, 0, 0.909686, 537.767, 5.1, 452.434) | transform = Transform3D(0.909686, 0, 0.415297, 0, 1, 0, -0.415297, 0, 0.909686, 537.767, 4, 452.434) | ||||||
| script = ExtResource("8_5kaye") |  | ||||||
| item = ExtResource("12_tj0lh") |  | ||||||
| amount = -1 |  | ||||||
| spawn_on_ready = true |  | ||||||
| spawn_turns = 1 |  | ||||||
| 
 | 
 | ||||||
| [node name="CityBuildings" type="Node3D" parent="."] | [node name="CityBuildings" type="Node3D" parent="."] | ||||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 129.404, -9.53674e-07, 309.4) | transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 129.404, -9.53674e-07, 309.4) | ||||||
| @ -446,14 +398,6 @@ transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, -0. | |||||||
| [node name="ConcreteBuilding3" parent="CityBuildings" instance=ExtResource("10_lf15j")] | [node name="ConcreteBuilding3" parent="CityBuildings" instance=ExtResource("10_lf15j")] | ||||||
| transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, -0.01, 40) | transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, -0.01, 40) | ||||||
| 
 | 
 | ||||||
| [node name="PlasmaBallSpawner" type="Marker3D" parent="CityBuildings/ConcreteBuilding3"] |  | ||||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 25.5, 0) |  | ||||||
| script = ExtResource("8_5kaye") |  | ||||||
| item = ExtResource("15_ir4ss") |  | ||||||
| amount = 3 |  | ||||||
| spawn_on_ready = true |  | ||||||
| spawn_turns = 2 |  | ||||||
| 
 |  | ||||||
| [node name="PalmTree" parent="CityBuildings" instance=ExtResource("12_sswxf")] | [node name="PalmTree" parent="CityBuildings" instance=ExtResource("12_sswxf")] | ||||||
| transform = Transform3D(-0.69799, 0, -0.716107, 0, 1, 0, 0.716107, 0, -0.69799, 11.468, 0, -12.468) | transform = Transform3D(-0.69799, 0, -0.716107, 0, 1, 0, 0.716107, 0, -0.69799, 11.468, 0, -12.468) | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -169,7 +169,7 @@ bones/23/scale = Vector3(1, 1, 1) | |||||||
| visible = false | visible = false | ||||||
| 
 | 
 | ||||||
| [node name="BoneAttachment3D" type="BoneAttachment3D" parent="Armature/Skeleton3D" index="6"] | [node name="BoneAttachment3D" type="BoneAttachment3D" parent="Armature/Skeleton3D" index="6"] | ||||||
| transform = Transform3D(-0.944935, 0.316364, -0.0837312, -0.325114, -0.936736, 0.129716, -0.0373963, 0.149795, 0.98801, -0.168866, 3.18028, 0.842582) | transform = Transform3D(-0.0322548, -0.997872, -0.0566729, 0.999469, -0.0324597, 0.00269911, -0.00453275, -0.0565558, 0.998389, -2.5177, 5.22011, -0.51637) | ||||||
| bone_name = "Hand.R" | bone_name = "Hand.R" | ||||||
| bone_idx = 11 | bone_idx = 11 | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -44,8 +44,6 @@ const MAGNUS_EPSILON := 1e-3 | |||||||
| 
 | 
 | ||||||
| var current_gravity: Vector3 | var current_gravity: Vector3 | ||||||
| 
 | 
 | ||||||
| var player: WorldPlayer |  | ||||||
| 
 |  | ||||||
| var _last_contact_normal: Vector3 = Vector3.UP | var _last_contact_normal: Vector3 = Vector3.UP | ||||||
| var _position_on_last_wake: Vector3 | var _position_on_last_wake: Vector3 | ||||||
| var _awake := false | var _awake := false | ||||||
|  | |||||||
| @ -14,7 +14,7 @@ | |||||||
| [ext_resource type="Script" path="res://src/equipment/balls/physics_ball/ball_particle_effects.gd" id="12_7krl6"] | [ext_resource type="Script" path="res://src/equipment/balls/physics_ball/ball_particle_effects.gd" id="12_7krl6"] | ||||||
| [ext_resource type="Texture2D" uid="uid://c47bkx508biqr" path="res://assets/sprites/particles/plasma.png" id="12_guipt"] | [ext_resource type="Texture2D" uid="uid://c47bkx508biqr" path="res://assets/sprites/particles/plasma.png" id="12_guipt"] | ||||||
| 
 | 
 | ||||||
| [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_s3hrj"] | [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xqofq"] | ||||||
| albedo_texture = ExtResource("1_y3q5j") | albedo_texture = ExtResource("1_y3q5j") | ||||||
| albedo_texture_force_srgb = true | albedo_texture_force_srgb = true | ||||||
| metallic = 0.27 | metallic = 0.27 | ||||||
| @ -27,7 +27,7 @@ uv1_scale = Vector3(3, 1.5, 3) | |||||||
| texture_filter = 4 | texture_filter = 4 | ||||||
| 
 | 
 | ||||||
| [sub_resource type="SphereMesh" id="SphereMesh_y0d13"] | [sub_resource type="SphereMesh" id="SphereMesh_y0d13"] | ||||||
| material = SubResource("StandardMaterial3D_s3hrj") | material = SubResource("StandardMaterial3D_xqofq") | ||||||
| radius = 0.05 | radius = 0.05 | ||||||
| height = 0.1 | height = 0.1 | ||||||
| radial_segments = 6 | radial_segments = 6 | ||||||
|  | |||||||
| @ -1,23 +1,22 @@ | |||||||
| [gd_scene load_steps=13 format=3 uid="uid://dcqxlbsrubapk"] | [gd_scene load_steps=11 format=3 uid="uid://dcqxlbsrubapk"] | ||||||
| 
 | 
 | ||||||
| [ext_resource type="PackedScene" uid="uid://dfttci386ohip" path="res://src/equipment/balls/physics_ball/physics_ball.tscn" id="1_yh4fp"] | [ext_resource type="PackedScene" uid="uid://dfttci386ohip" path="res://src/equipment/balls/physics_ball/physics_ball.tscn" id="1_yh4fp"] | ||||||
| [ext_resource type="Texture2D" uid="uid://c47bkx508biqr" path="res://assets/sprites/particles/plasma.png" id="2_8fdyx"] | [ext_resource type="Texture2D" uid="uid://c47bkx508biqr" path="res://assets/sprites/particles/plasma.png" id="2_8fdyx"] | ||||||
| [ext_resource type="Script" path="res://src/equipment/balls/plasma_ball/plasma_ball.gd" id="2_16fhh"] | [ext_resource type="Script" path="res://src/equipment/balls/plasma_ball/plasma_ball.gd" id="2_16fhh"] | ||||||
| [ext_resource type="Material" uid="uid://f3qufrkoiv66" path="res://assets/materials/plasma_ball.tres" id="3_6gyuc"] |  | ||||||
| 
 | 
 | ||||||
| [sub_resource type="Curve" id="Curve_kabhn"] | [sub_resource type="Curve" id="Curve_kabhn"] | ||||||
| max_value = 2.0 | max_value = 2.0 | ||||||
| _data = [Vector2(0, 2), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] | _data = [Vector2(0, 2), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] | ||||||
| point_count = 2 | point_count = 2 | ||||||
| 
 | 
 | ||||||
| [sub_resource type="CurveTexture" id="CurveTexture_v8ki1"] | [sub_resource type="CurveTexture" id="CurveTexture_oxhrr"] | ||||||
| curve = SubResource("Curve_kabhn") | curve = SubResource("Curve_kabhn") | ||||||
| 
 | 
 | ||||||
| [sub_resource type="Curve" id="Curve_77lhu"] | [sub_resource type="Curve" id="Curve_77lhu"] | ||||||
| _data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.249135, 1), 0.0, 0.0, 0, 0, Vector2(1, 0.598878), -0.922125, -0.922125, 0, 0] | _data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.249135, 1), 0.0, 0.0, 0, 0, Vector2(1, 0.598878), -0.922125, -0.922125, 0, 0] | ||||||
| point_count = 3 | point_count = 3 | ||||||
| 
 | 
 | ||||||
| [sub_resource type="CurveTexture" id="CurveTexture_wkho1"] | [sub_resource type="CurveTexture" id="CurveTexture_vfusk"] | ||||||
| curve = SubResource("Curve_77lhu") | curve = SubResource("Curve_77lhu") | ||||||
| 
 | 
 | ||||||
| [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_uffe8"] | [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_uffe8"] | ||||||
| @ -27,10 +26,10 @@ direction = Vector3(0, 1, 0) | |||||||
| spread = 10.0 | spread = 10.0 | ||||||
| initial_velocity_max = 0.1 | initial_velocity_max = 0.1 | ||||||
| gravity = Vector3(0, 2, 0) | gravity = Vector3(0, 2, 0) | ||||||
| scale_curve = SubResource("CurveTexture_wkho1") | scale_curve = SubResource("CurveTexture_vfusk") | ||||||
| emission_curve = SubResource("CurveTexture_v8ki1") | emission_curve = SubResource("CurveTexture_oxhrr") | ||||||
| 
 | 
 | ||||||
| [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_tyfsm"] | [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_7ptri"] | ||||||
| transparency = 1 | transparency = 1 | ||||||
| vertex_color_use_as_albedo = true | vertex_color_use_as_albedo = true | ||||||
| albedo_color = Color(0.48, 1, 1, 0.384314) | albedo_color = Color(0.48, 1, 1, 0.384314) | ||||||
| @ -45,28 +44,17 @@ particles_anim_loop = false | |||||||
| grow_amount = -0.6 | grow_amount = -0.6 | ||||||
| 
 | 
 | ||||||
| [sub_resource type="QuadMesh" id="QuadMesh_go8iw"] | [sub_resource type="QuadMesh" id="QuadMesh_go8iw"] | ||||||
| material = SubResource("StandardMaterial3D_tyfsm") | material = SubResource("StandardMaterial3D_7ptri") | ||||||
| size = Vector2(0.4, 0.4) | size = Vector2(0.4, 0.4) | ||||||
| 
 | 
 | ||||||
| [sub_resource type="SphereShape3D" id="SphereShape3D_muqqr"] |  | ||||||
| radius = 0.1 |  | ||||||
| 
 |  | ||||||
| [node name="PlasmaBall" instance=ExtResource("1_yh4fp")] | [node name="PlasmaBall" instance=ExtResource("1_yh4fp")] | ||||||
| script = ExtResource("2_16fhh") | script = ExtResource("2_16fhh") | ||||||
| magnetic = true | magnetic = true | ||||||
| 
 | 
 | ||||||
| [node name="BallMesh" parent="." index="0"] |  | ||||||
| transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0) |  | ||||||
| surface_material_override/0 = ExtResource("3_6gyuc") |  | ||||||
| 
 |  | ||||||
| [node name="PlasmaFireEffect" type="GPUParticles3D" parent="BallMesh" index="0"] | [node name="PlasmaFireEffect" type="GPUParticles3D" parent="BallMesh" index="0"] | ||||||
| sorting_offset = -1.0 |  | ||||||
| amount = 20 | amount = 20 | ||||||
| lifetime = 0.6 | lifetime = 0.6 | ||||||
| process_material = SubResource("ParticleProcessMaterial_uffe8") | process_material = SubResource("ParticleProcessMaterial_uffe8") | ||||||
| draw_pass_1 = SubResource("QuadMesh_go8iw") | draw_pass_1 = SubResource("QuadMesh_go8iw") | ||||||
| 
 | 
 | ||||||
| [node name="CollisionShape3D" parent="." index="1"] |  | ||||||
| shape = SubResource("SphereShape3D_muqqr") |  | ||||||
| 
 |  | ||||||
| [connection signal="body_entered" from="." to="." method="_on_body_entered"] | [connection signal="body_entered" from="." to="." method="_on_body_entered"] | ||||||
|  | |||||||
| @ -1,119 +0,0 @@ | |||||||
| [gd_scene load_steps=9 format=3 uid="uid://cjne55s85x7jy"] |  | ||||||
| 
 |  | ||||||
| [ext_resource type="PackedScene" uid="uid://comd88yp45mnb" path="res://src/items/item/item.tscn" id="1_gflnq"] |  | ||||||
| [ext_resource type="PackedScene" uid="uid://b1aslqfbciwg8" path="res://assets/models/balls/brick/brick.gltf" id="2_sucaq"] |  | ||||||
| [ext_resource type="Script" path="res://src/items/extra_ball/extra_ball.gd" id="2_vfkkm"] |  | ||||||
| [ext_resource type="Texture2D" uid="uid://b1o4dw8h1so8n" path="res://assets/models/balls/brick/Brick.png" id="3_p2b2v"] |  | ||||||
| 
 |  | ||||||
| [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_l2xx4"] |  | ||||||
| albedo_texture = ExtResource("3_p2b2v") |  | ||||||
| texture_filter = 2 |  | ||||||
| 
 |  | ||||||
| [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="BrickItem" instance=ExtResource("1_gflnq")] |  | ||||||
| script = ExtResource("2_vfkkm") |  | ||||||
| ball_type = 3 |  | ||||||
| amount = 0 |  | ||||||
| 
 |  | ||||||
| [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="brick" parent="Pivot/Octahedron/ItemMeshContainer/Pivot" index="1" instance=ExtResource("2_sucaq")] |  | ||||||
| transform = Transform3D(2, 0, 0, 0, 1.41421, -1.41421, 0, 1.41421, 1.41421, 0, 0, 0) |  | ||||||
| 
 |  | ||||||
| [node name="Brick" parent="Pivot/Octahedron/ItemMeshContainer/Pivot/brick" index="0"] |  | ||||||
| surface_material_override/0 = SubResource("StandardMaterial3D_l2xx4") |  | ||||||
| 
 |  | ||||||
| [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/brick"] |  | ||||||
| @ -1,13 +0,0 @@ | |||||||
| class_name ExtraBall extends Item |  | ||||||
| ## Item which grants extra balls when picked up. |  | ||||||
| ## Amount values < 0 will instead grant the player unlimited ammunition of this type. |  | ||||||
| 
 |  | ||||||
| ## Type of ball which will be replenished. |  | ||||||
| @export var ball_type: GameBall.Type |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| func _collect(player: WorldPlayer) -> void: |  | ||||||
| 	if amount < 0: |  | ||||||
| 		player.set_balls(ball_type, -1) |  | ||||||
| 	else: |  | ||||||
| 		player.mutate_balls(ball_type, amount) |  | ||||||
| @ -1,198 +0,0 @@ | |||||||
| [gd_scene load_steps=20 format=3 uid="uid://mcuhy71v6ggu"] |  | ||||||
| 
 |  | ||||||
| [ext_resource type="PackedScene" uid="uid://comd88yp45mnb" path="res://src/items/item/item.tscn" id="1_f11yp"] |  | ||||||
| [ext_resource type="Script" path="res://src/items/extra_ball/extra_ball.gd" id="2_tixea"] |  | ||||||
| [ext_resource type="Shader" path="res://src/shaders/frosted_glass.gdshader" id="3_ljwjj"] |  | ||||||
| [ext_resource type="Texture2D" uid="uid://c2p2in2p7mjyo" path="res://assets/materials/crystal_noise_normal_map.tres" id="4_da2m2"] |  | ||||||
| [ext_resource type="Texture2D" uid="uid://cx33n4h5mfcdb" path="res://assets/materials/crystal_noise_map.tres" id="5_mfadb"] |  | ||||||
| [ext_resource type="Material" uid="uid://f3qufrkoiv66" path="res://assets/materials/plasma_ball.tres" id="6_o5jva"] |  | ||||||
| [ext_resource type="Texture2D" uid="uid://c47bkx508biqr" path="res://assets/sprites/particles/plasma.png" id="8_tjeqq"] |  | ||||||
| 
 |  | ||||||
| [sub_resource type="ShaderMaterial" id="ShaderMaterial_4un1r"] |  | ||||||
| render_priority = 0 |  | ||||||
| shader = ExtResource("3_ljwjj") |  | ||||||
| shader_parameter/albedo = Color(0.5146, 0.62, 0.62, 0.0392157) |  | ||||||
| shader_parameter/roughness = 0.3 |  | ||||||
| shader_parameter/roughness_texture = ExtResource("5_mfadb") |  | ||||||
| shader_parameter/refraction = 0.0100008 |  | ||||||
| shader_parameter/refraction_texture_channel = Vector4(1, 0, 0, 0) |  | ||||||
| shader_parameter/texture_refraction = ExtResource("5_mfadb") |  | ||||||
| shader_parameter/normal_strength = 0.400001 |  | ||||||
| shader_parameter/normal_map = ExtResource("4_da2m2") |  | ||||||
| shader_parameter/subsurface_scattering_strength = 1.0 |  | ||||||
| shader_parameter/texture_subsurface_scattering = ExtResource("5_mfadb") |  | ||||||
| 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 = 0.9 |  | ||||||
| shader_parameter/uv1_scale = Vector3(1, 1, 1) |  | ||||||
| shader_parameter/uv1_offset = Vector3(0, 0, 0) |  | ||||||
| 
 |  | ||||||
| [sub_resource type="SphereMesh" id="SphereMesh_2r4nb"] |  | ||||||
| material = ExtResource("6_o5jva") |  | ||||||
| radius = 0.05 |  | ||||||
| height = 0.1 |  | ||||||
| radial_segments = 6 |  | ||||||
| rings = 6 |  | ||||||
| 
 |  | ||||||
| [sub_resource type="Curve" id="Curve_jkdik"] |  | ||||||
| max_value = 2.0 |  | ||||||
| _data = [Vector2(0, 2), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] |  | ||||||
| point_count = 2 |  | ||||||
| 
 |  | ||||||
| [sub_resource type="CurveTexture" id="CurveTexture_oxhrr"] |  | ||||||
| curve = SubResource("Curve_jkdik") |  | ||||||
| 
 |  | ||||||
| [sub_resource type="Curve" id="Curve_wa74n"] |  | ||||||
| _data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.249135, 1), 0.0, 0.0, 0, 0, Vector2(1, 0.598878), -0.922125, -0.922125, 0, 0] |  | ||||||
| point_count = 3 |  | ||||||
| 
 |  | ||||||
| [sub_resource type="CurveTexture" id="CurveTexture_vfusk"] |  | ||||||
| curve = SubResource("Curve_wa74n") |  | ||||||
| 
 |  | ||||||
| [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_wmn3a"] |  | ||||||
| angle_min = -720.0 |  | ||||||
| angle_max = 720.0 |  | ||||||
| direction = Vector3(0, 1, 0) |  | ||||||
| spread = 10.0 |  | ||||||
| initial_velocity_max = 0.1 |  | ||||||
| gravity = Vector3(0, 1.2, 0) |  | ||||||
| scale_curve = SubResource("CurveTexture_vfusk") |  | ||||||
| emission_curve = SubResource("CurveTexture_oxhrr") |  | ||||||
| 
 |  | ||||||
| [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_7ptri"] |  | ||||||
| transparency = 1 |  | ||||||
| cull_mode = 2 |  | ||||||
| vertex_color_use_as_albedo = true |  | ||||||
| albedo_color = Color(0.48, 1, 1, 0.384314) |  | ||||||
| albedo_texture = ExtResource("8_tjeqq") |  | ||||||
| emission_enabled = true |  | ||||||
| emission = Color(0.42, 1, 1, 1) |  | ||||||
| billboard_mode = 3 |  | ||||||
| billboard_keep_scale = true |  | ||||||
| particles_anim_h_frames = 1 |  | ||||||
| particles_anim_v_frames = 1 |  | ||||||
| particles_anim_loop = false |  | ||||||
| grow_amount = -0.6 |  | ||||||
| 
 |  | ||||||
| [sub_resource type="QuadMesh" id="QuadMesh_lsswf"] |  | ||||||
| material = SubResource("StandardMaterial3D_7ptri") |  | ||||||
| size = Vector2(0.8, 0.8) |  | ||||||
| 
 |  | ||||||
| [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="PlasmaBallItem" instance=ExtResource("1_f11yp")] |  | ||||||
| script = ExtResource("2_tixea") |  | ||||||
| ball_type = 2 |  | ||||||
| amount = 3 |  | ||||||
| 
 |  | ||||||
| [node name="Octahedron" parent="Pivot/Octahedron" index="0"] |  | ||||||
| surface_material_override/0 = SubResource("ShaderMaterial_4un1r") |  | ||||||
| 
 |  | ||||||
| [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, 4, 0, 0, 0, 4, 0, 0, 0) |  | ||||||
| mesh = SubResource("SphereMesh_2r4nb") |  | ||||||
| 
 |  | ||||||
| [node name="PlasmaFireEffect" type="GPUParticles3D" parent="Pivot/Octahedron/ItemMeshContainer/Pivot/BallMesh" index="0"] |  | ||||||
| sorting_offset = -1.0 |  | ||||||
| amount = 20 |  | ||||||
| lifetime = 0.6 |  | ||||||
| speed_scale = 0.2 |  | ||||||
| process_material = SubResource("ParticleProcessMaterial_wmn3a") |  | ||||||
| draw_pass_1 = SubResource("QuadMesh_lsswf") |  | ||||||
| 
 |  | ||||||
| [node name="@AnimationPlayer@183828" type="AnimationPlayer" parent="Pivot/Octahedron" index="2"] |  | ||||||
| libraries = { |  | ||||||
| "": SubResource("AnimationLibrary_jwejx") |  | ||||||
| } |  | ||||||
| autoplay = "idle" |  | ||||||
| 
 |  | ||||||
| [editable path="Pivot/Octahedron"] |  | ||||||
| @ -1,28 +0,0 @@ | |||||||
| class_name Item extends Node3D |  | ||||||
| ## Base class for item pick-ups in the world. |  | ||||||
| 
 |  | ||||||
| signal on_collect(player: WorldPlayer) |  | ||||||
| 
 |  | ||||||
| ## Quantity of the underlying item this pick-up will grant when collected. |  | ||||||
| ## What this actually means is implementation-dependent. |  | ||||||
| @export var amount: int = 1 |  | ||||||
| 
 |  | ||||||
| @onready var explosion_player: AnimationPlayer = %ExplosionPlayer |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| func collect(player: WorldPlayer) -> void: |  | ||||||
| 	# Note that this animation will call `queue_free` in 5 seconds! |  | ||||||
| 	explosion_player.play("explode") |  | ||||||
| 	_collect(player) |  | ||||||
| 	on_collect.emit(player) |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| func _collect(_player: WorldPlayer) -> void: |  | ||||||
| 	pass  # Defined in derived type |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| func _on_collection_area_body_entered(body: Node3D) -> void: |  | ||||||
| 	if body is GameBall: |  | ||||||
| 		var ball: GameBall = body |  | ||||||
| 		if ball.player: |  | ||||||
| 			collect(ball.player) |  | ||||||
| @ -1,450 +0,0 @@ | |||||||
| [gd_scene load_steps=29 format=3 uid="uid://comd88yp45mnb"] |  | ||||||
| 
 |  | ||||||
| [ext_resource type="PackedScene" uid="uid://djfbit4v0qncc" path="res://assets/models/items/octahedron.gltf" id="1_a0q17"] |  | ||||||
| [ext_resource type="Script" path="res://src/items/item/item.gd" id="1_kesm6"] |  | ||||||
| [ext_resource type="Material" uid="uid://c5hidbq5gbmr" path="res://assets/materials/crystal.tres" id="2_dtimm"] |  | ||||||
| [ext_resource type="Shader" path="res://src/shaders/spatial_shine.gdshader" id="5_hvjqo"] |  | ||||||
| [ext_resource type="Texture2D" uid="uid://du3vk5nnksohs" path="res://assets/sprites/particles/sparkle.png" id="5_k1sdu"] |  | ||||||
| 
 |  | ||||||
| [sub_resource type="Animation" id="Animation_7sxyq"] |  | ||||||
| length = 0.001 |  | ||||||
| tracks/0/type = "bezier" |  | ||||||
| tracks/0/imported = false |  | ||||||
| tracks/0/enabled = true |  | ||||||
| tracks/0/path = NodePath(".:position:x") |  | ||||||
| tracks/0/interp = 1 |  | ||||||
| tracks/0/loop_wrap = true |  | ||||||
| tracks/0/keys = { |  | ||||||
| "handle_modes": PackedInt32Array(0), |  | ||||||
| "points": PackedFloat32Array(0, -0.25, 0, 0.25, 0), |  | ||||||
| "times": PackedFloat32Array(0) |  | ||||||
| } |  | ||||||
| tracks/1/type = "bezier" |  | ||||||
| tracks/1/imported = false |  | ||||||
| tracks/1/enabled = true |  | ||||||
| tracks/1/path = NodePath(".:position:y") |  | ||||||
| tracks/1/interp = 1 |  | ||||||
| tracks/1/loop_wrap = true |  | ||||||
| tracks/1/keys = { |  | ||||||
| "handle_modes": PackedInt32Array(0), |  | ||||||
| "points": PackedFloat32Array(0, -0.25, 0, 0.25, 0), |  | ||||||
| "times": PackedFloat32Array(0) |  | ||||||
| } |  | ||||||
| tracks/2/type = "bezier" |  | ||||||
| tracks/2/imported = false |  | ||||||
| tracks/2/enabled = true |  | ||||||
| tracks/2/path = NodePath(".:position:z") |  | ||||||
| tracks/2/interp = 1 |  | ||||||
| tracks/2/loop_wrap = true |  | ||||||
| tracks/2/keys = { |  | ||||||
| "handle_modes": PackedInt32Array(0), |  | ||||||
| "points": PackedFloat32Array(0, -0.25, 0, 0.25, 0), |  | ||||||
| "times": PackedFloat32Array(0) |  | ||||||
| } |  | ||||||
| tracks/3/type = "value" |  | ||||||
| tracks/3/imported = false |  | ||||||
| tracks/3/enabled = true |  | ||||||
| tracks/3/path = NodePath(".:rotation") |  | ||||||
| tracks/3/interp = 1 |  | ||||||
| tracks/3/loop_wrap = true |  | ||||||
| tracks/3/keys = { |  | ||||||
| "times": PackedFloat32Array(0), |  | ||||||
| "transitions": PackedFloat32Array(1), |  | ||||||
| "update": 0, |  | ||||||
| "values": [Vector3(0, 0, -0.0523599)] |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| [sub_resource type="Animation" id="Animation_j8bih"] |  | ||||||
| resource_name = "pivot" |  | ||||||
| length = 1.6 |  | ||||||
| loop_mode = 1 |  | ||||||
| tracks/0/type = "bezier" |  | ||||||
| tracks/0/imported = false |  | ||||||
| tracks/0/enabled = true |  | ||||||
| tracks/0/path = NodePath(".:position:x") |  | ||||||
| tracks/0/interp = 1 |  | ||||||
| tracks/0/loop_wrap = true |  | ||||||
| tracks/0/keys = { |  | ||||||
| "handle_modes": PackedInt32Array(0, 0, 0), |  | ||||||
| "points": PackedFloat32Array(0, -0.25, 0, 0.4, 0.1, 0, -0.4, -0.1, 0.4, 0.1, 0, -0.4, -0.1, 0.25, 0), |  | ||||||
| "times": PackedFloat32Array(0, 0.8, 1.6) |  | ||||||
| } |  | ||||||
| tracks/1/type = "bezier" |  | ||||||
| tracks/1/imported = false |  | ||||||
| tracks/1/enabled = true |  | ||||||
| tracks/1/path = NodePath(".:position:y") |  | ||||||
| tracks/1/interp = 1 |  | ||||||
| tracks/1/loop_wrap = true |  | ||||||
| tracks/1/keys = { |  | ||||||
| "handle_modes": PackedInt32Array(0, 0, 0), |  | ||||||
| "points": PackedFloat32Array(0.05, -0.25, 0, 0.4, 0, -0.05, -0.25, 0, 0.25, 0, 0.05, -0.4, 0, 0.25, 0), |  | ||||||
| "times": PackedFloat32Array(0, 0.8, 1.6) |  | ||||||
| } |  | ||||||
| tracks/2/type = "bezier" |  | ||||||
| tracks/2/imported = false |  | ||||||
| tracks/2/enabled = true |  | ||||||
| tracks/2/path = NodePath(".:position:z") |  | ||||||
| tracks/2/interp = 1 |  | ||||||
| tracks/2/loop_wrap = true |  | ||||||
| tracks/2/keys = { |  | ||||||
| "handle_modes": PackedInt32Array(0), |  | ||||||
| "points": PackedFloat32Array(0, -0.25, 0, 0.4, 0.1), |  | ||||||
| "times": PackedFloat32Array(0) |  | ||||||
| } |  | ||||||
| tracks/3/type = "value" |  | ||||||
| tracks/3/imported = false |  | ||||||
| tracks/3/enabled = true |  | ||||||
| tracks/3/path = NodePath(".:rotation") |  | ||||||
| tracks/3/interp = 2 |  | ||||||
| tracks/3/loop_wrap = true |  | ||||||
| tracks/3/keys = { |  | ||||||
| "times": PackedFloat32Array(0, 0.4, 0.8, 1.2, 1.6), |  | ||||||
| "transitions": PackedFloat32Array(1, 1, 1, 1, 1), |  | ||||||
| "update": 0, |  | ||||||
| "values": [Vector3(0, 0, 0.0523599), Vector3(0, 0, -0.0523599), Vector3(0, 0, 0.0523599), Vector3(0, 0, -0.0523599), Vector3(0, 0, 0.0523599)] |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| [sub_resource type="AnimationLibrary" id="AnimationLibrary_3k4mu"] |  | ||||||
| _data = { |  | ||||||
| "RESET": SubResource("Animation_7sxyq"), |  | ||||||
| "pivot": SubResource("Animation_j8bih") |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| [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") |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| [sub_resource type="Curve" id="Curve_1syyy"] |  | ||||||
| _data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.751579, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] |  | ||||||
| point_count = 3 |  | ||||||
| 
 |  | ||||||
| [sub_resource type="CurveTexture" id="CurveTexture_3g61g"] |  | ||||||
| curve = SubResource("Curve_1syyy") |  | ||||||
| 
 |  | ||||||
| [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_jocqm"] |  | ||||||
| lifetime_randomness = 0.63 |  | ||||||
| particle_flag_align_y = true |  | ||||||
| emission_shape = 2 |  | ||||||
| emission_sphere_radius = 0.5 |  | ||||||
| direction = Vector3(0, 0, 0) |  | ||||||
| radial_velocity_min = 4.99998 |  | ||||||
| radial_velocity_max = 4.99998 |  | ||||||
| gravity = Vector3(0, -4, 0) |  | ||||||
| scale_curve = SubResource("CurveTexture_3g61g") |  | ||||||
| 
 |  | ||||||
| [sub_resource type="PrismMesh" id="PrismMesh_32wcu"] |  | ||||||
| material = ExtResource("2_dtimm") |  | ||||||
| size = Vector3(0.3, -0.2, 0.3) |  | ||||||
| 
 |  | ||||||
| [sub_resource type="Gradient" id="Gradient_f63as"] |  | ||||||
| offsets = PackedFloat32Array(0.211663, 1) |  | ||||||
| colors = PackedColorArray(1, 1, 0.51, 1, 1, 1, 1, 1) |  | ||||||
| 
 |  | ||||||
| [sub_resource type="GradientTexture1D" id="GradientTexture1D_r7x43"] |  | ||||||
| gradient = SubResource("Gradient_f63as") |  | ||||||
| 
 |  | ||||||
| [sub_resource type="ShaderMaterial" id="ShaderMaterial_wolv7"] |  | ||||||
| render_priority = 0 |  | ||||||
| shader = ExtResource("5_hvjqo") |  | ||||||
| shader_parameter/spread = 0.5 |  | ||||||
| shader_parameter/cutoff = 0.5 |  | ||||||
| shader_parameter/size = 1.0 |  | ||||||
| shader_parameter/speed = 1.0 |  | ||||||
| shader_parameter/ray1_density = 8.0 |  | ||||||
| shader_parameter/ray2_density = 30.0 |  | ||||||
| shader_parameter/ray2_intensity = 0.3 |  | ||||||
| shader_parameter/core_intensity = 0.5 |  | ||||||
| shader_parameter/hdr = true |  | ||||||
| shader_parameter/seed = 5.0 |  | ||||||
| shader_parameter/grow = -0.0999992 |  | ||||||
| shader_parameter/uv1_scale = Vector3(1, 1, 1) |  | ||||||
| shader_parameter/uv1_offset = Vector3(0, 0, 0) |  | ||||||
| shader_parameter/uv2_scale = Vector3(1, 1, 1) |  | ||||||
| shader_parameter/uv2_offset = Vector3(0, 0, 0) |  | ||||||
| shader_parameter/gradient = SubResource("GradientTexture1D_r7x43") |  | ||||||
| 
 |  | ||||||
| [sub_resource type="QuadMesh" id="QuadMesh_iuh4w"] |  | ||||||
| material = SubResource("ShaderMaterial_wolv7") |  | ||||||
| size = Vector2(3, 3) |  | ||||||
| 
 |  | ||||||
| [sub_resource type="SphereShape3D" id="SphereShape3D_munrb"] |  | ||||||
| radius = 2.0 |  | ||||||
| 
 |  | ||||||
| [sub_resource type="Curve" id="Curve_4pwcs"] |  | ||||||
| _data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.248421, 1), 0.0, 0.0, 0, 0, Vector2(0.549474, 0.555075), 5.83005, 5.83005, 0, 0, Vector2(0.80421, 0.232888), 7.10071, 7.10071, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] |  | ||||||
| point_count = 5 |  | ||||||
| 
 |  | ||||||
| [sub_resource type="CurveTexture" id="CurveTexture_xmh5j"] |  | ||||||
| curve = SubResource("Curve_4pwcs") |  | ||||||
| 
 |  | ||||||
| [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_xdagn"] |  | ||||||
| direction = Vector3(0, 0, 0) |  | ||||||
| spread = 180.0 |  | ||||||
| initial_velocity_min = 0.5 |  | ||||||
| initial_velocity_max = 0.5 |  | ||||||
| gravity = Vector3(0, 0, 0) |  | ||||||
| damping_min = 0.1 |  | ||||||
| damping_max = 0.1 |  | ||||||
| scale_curve = SubResource("CurveTexture_xmh5j") |  | ||||||
| 
 |  | ||||||
| [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ttptx"] |  | ||||||
| transparency = 1 |  | ||||||
| shading_mode = 0 |  | ||||||
| vertex_color_use_as_albedo = true |  | ||||||
| albedo_texture = ExtResource("5_k1sdu") |  | ||||||
| texture_filter = 4 |  | ||||||
| billboard_mode = 3 |  | ||||||
| billboard_keep_scale = true |  | ||||||
| particles_anim_h_frames = 1 |  | ||||||
| particles_anim_v_frames = 1 |  | ||||||
| particles_anim_loop = false |  | ||||||
| 
 |  | ||||||
| [sub_resource type="QuadMesh" id="QuadMesh_es7cm"] |  | ||||||
| material = SubResource("StandardMaterial3D_ttptx") |  | ||||||
| size = Vector2(0.05, 0.05) |  | ||||||
| 
 |  | ||||||
| [sub_resource type="Animation" id="Animation_50jqd"] |  | ||||||
| length = 0.001 |  | ||||||
| tracks/0/type = "value" |  | ||||||
| tracks/0/imported = false |  | ||||||
| tracks/0/enabled = true |  | ||||||
| tracks/0/path = NodePath("Pivot/Octahedron/ExplosionParticles:emitting") |  | ||||||
| tracks/0/interp = 1 |  | ||||||
| tracks/0/loop_wrap = true |  | ||||||
| tracks/0/keys = { |  | ||||||
| "times": PackedFloat32Array(0), |  | ||||||
| "transitions": PackedFloat32Array(1), |  | ||||||
| "update": 1, |  | ||||||
| "values": [false] |  | ||||||
| } |  | ||||||
| tracks/1/type = "value" |  | ||||||
| tracks/1/imported = false |  | ||||||
| tracks/1/enabled = true |  | ||||||
| tracks/1/path = NodePath("Pivot/Octahedron/Octahedron:visible") |  | ||||||
| tracks/1/interp = 1 |  | ||||||
| tracks/1/loop_wrap = true |  | ||||||
| tracks/1/keys = { |  | ||||||
| "times": PackedFloat32Array(0), |  | ||||||
| "transitions": PackedFloat32Array(1), |  | ||||||
| "update": 1, |  | ||||||
| "values": [true] |  | ||||||
| } |  | ||||||
| tracks/2/type = "value" |  | ||||||
| tracks/2/imported = false |  | ||||||
| tracks/2/enabled = true |  | ||||||
| tracks/2/path = NodePath("Pivot/SparkleParticles:emitting") |  | ||||||
| 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="Animation" id="Animation_niure"] |  | ||||||
| resource_name = "explode" |  | ||||||
| length = 5.0 |  | ||||||
| tracks/0/type = "value" |  | ||||||
| tracks/0/imported = false |  | ||||||
| tracks/0/enabled = true |  | ||||||
| tracks/0/path = NodePath("Pivot/Octahedron/ExplosionParticles:emitting") |  | ||||||
| tracks/0/interp = 1 |  | ||||||
| tracks/0/loop_wrap = true |  | ||||||
| tracks/0/keys = { |  | ||||||
| "times": PackedFloat32Array(0), |  | ||||||
| "transitions": PackedFloat32Array(1), |  | ||||||
| "update": 1, |  | ||||||
| "values": [true] |  | ||||||
| } |  | ||||||
| tracks/1/type = "value" |  | ||||||
| tracks/1/imported = false |  | ||||||
| tracks/1/enabled = true |  | ||||||
| tracks/1/path = NodePath("Pivot/Octahedron/Octahedron:visible") |  | ||||||
| tracks/1/interp = 1 |  | ||||||
| tracks/1/loop_wrap = true |  | ||||||
| tracks/1/keys = { |  | ||||||
| "times": PackedFloat32Array(0), |  | ||||||
| "transitions": PackedFloat32Array(1), |  | ||||||
| "update": 1, |  | ||||||
| "values": [false] |  | ||||||
| } |  | ||||||
| tracks/2/type = "value" |  | ||||||
| tracks/2/imported = false |  | ||||||
| tracks/2/enabled = true |  | ||||||
| tracks/2/path = NodePath("Pivot/SparkleParticles:emitting") |  | ||||||
| tracks/2/interp = 1 |  | ||||||
| tracks/2/loop_wrap = true |  | ||||||
| tracks/2/keys = { |  | ||||||
| "times": PackedFloat32Array(0), |  | ||||||
| "transitions": PackedFloat32Array(1), |  | ||||||
| "update": 1, |  | ||||||
| "values": [false] |  | ||||||
| } |  | ||||||
| tracks/3/type = "method" |  | ||||||
| tracks/3/imported = false |  | ||||||
| tracks/3/enabled = true |  | ||||||
| tracks/3/path = NodePath(".") |  | ||||||
| tracks/3/interp = 1 |  | ||||||
| tracks/3/loop_wrap = true |  | ||||||
| tracks/3/keys = { |  | ||||||
| "times": PackedFloat32Array(5), |  | ||||||
| "transitions": PackedFloat32Array(1), |  | ||||||
| "values": [{ |  | ||||||
| "args": [], |  | ||||||
| "method": &"queue_free" |  | ||||||
| }] |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| [sub_resource type="AnimationLibrary" id="AnimationLibrary_lqra6"] |  | ||||||
| _data = { |  | ||||||
| "RESET": SubResource("Animation_50jqd"), |  | ||||||
| "explode": SubResource("Animation_niure") |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| [node name="Item" type="Node3D"] |  | ||||||
| script = ExtResource("1_kesm6") |  | ||||||
| 
 |  | ||||||
| [node name="Pivot" type="Node3D" parent="."] |  | ||||||
| 
 |  | ||||||
| [node name="Octahedron" parent="Pivot" instance=ExtResource("1_a0q17")] |  | ||||||
| 
 |  | ||||||
| [node name="Octahedron" parent="Pivot/Octahedron" index="0"] |  | ||||||
| surface_material_override/0 = ExtResource("2_dtimm") |  | ||||||
| 
 |  | ||||||
| [node name="ItemMeshContainer" type="Node3D" parent="Pivot/Octahedron"] |  | ||||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.2, 0) |  | ||||||
| 
 |  | ||||||
| [node name="Pivot" type="Node3D" parent="Pivot/Octahedron/ItemMeshContainer"] |  | ||||||
| transform = Transform3D(0.99863, 0.052336, 0, -0.052336, 0.99863, 0, 0, 0, 1, 0, 0, 0) |  | ||||||
| 
 |  | ||||||
| [node name="PivotAnimation" type="AnimationPlayer" parent="Pivot/Octahedron/ItemMeshContainer/Pivot"] |  | ||||||
| libraries = { |  | ||||||
| "": SubResource("AnimationLibrary_3k4mu") |  | ||||||
| } |  | ||||||
| autoplay = "pivot" |  | ||||||
| speed_scale = 0.5 |  | ||||||
| 
 |  | ||||||
| [node name="ItemAnimation" type="AnimationPlayer" parent="Pivot/Octahedron"] |  | ||||||
| libraries = { |  | ||||||
| "": SubResource("AnimationLibrary_jwejx") |  | ||||||
| } |  | ||||||
| autoplay = "idle" |  | ||||||
| 
 |  | ||||||
| [node name="ExplosionParticles" type="GPUParticles3D" parent="Pivot/Octahedron"] |  | ||||||
| emitting = false |  | ||||||
| amount = 64 |  | ||||||
| one_shot = true |  | ||||||
| explosiveness = 1.0 |  | ||||||
| fixed_fps = 60 |  | ||||||
| interpolate = false |  | ||||||
| process_material = SubResource("ParticleProcessMaterial_jocqm") |  | ||||||
| draw_pass_1 = SubResource("PrismMesh_32wcu") |  | ||||||
| 
 |  | ||||||
| [node name="Shine" type="MeshInstance3D" parent="Pivot"] |  | ||||||
| visible = false |  | ||||||
| mesh = SubResource("QuadMesh_iuh4w") |  | ||||||
| 
 |  | ||||||
| [node name="CollectionArea" type="Area3D" parent="Pivot"] |  | ||||||
| 
 |  | ||||||
| [node name="CollisionShape3D" type="CollisionShape3D" parent="Pivot/CollectionArea"] |  | ||||||
| shape = SubResource("SphereShape3D_munrb") |  | ||||||
| 
 |  | ||||||
| [node name="SparkleParticles" type="GPUParticles3D" parent="Pivot"] |  | ||||||
| amount = 64 |  | ||||||
| lifetime = 5.0 |  | ||||||
| preprocess = 5.0 |  | ||||||
| process_material = SubResource("ParticleProcessMaterial_xdagn") |  | ||||||
| draw_pass_1 = SubResource("QuadMesh_es7cm") |  | ||||||
| 
 |  | ||||||
| [node name="ExplosionPlayer" type="AnimationPlayer" parent="."] |  | ||||||
| unique_name_in_owner = true |  | ||||||
| libraries = { |  | ||||||
| "": SubResource("AnimationLibrary_lqra6") |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| [connection signal="body_entered" from="Pivot/CollectionArea" to="." method="_on_collection_area_body_entered"] |  | ||||||
| 
 |  | ||||||
| [editable path="Pivot/Octahedron"] |  | ||||||
| @ -1,77 +0,0 @@ | |||||||
| class_name ItemSpawner extends Marker3D |  | ||||||
| ## Entity that spawns a given item when conditions are met. |  | ||||||
| 
 |  | ||||||
| signal item_spawned(item: Item) |  | ||||||
| 
 |  | ||||||
| const POP_IN_TIME := 1.618 |  | ||||||
| 
 |  | ||||||
| ## Item to be spawned |  | ||||||
| @export var item: PackedScene |  | ||||||
| 
 |  | ||||||
| ## Quantity of the given item to include in the spawned item pickup, where applicable. |  | ||||||
| @export var amount: int = 1 |  | ||||||
| 
 |  | ||||||
| @export_category("Spawn Conditions") |  | ||||||
| ## Spawn an item when the tree is loaded. |  | ||||||
| @export var spawn_on_ready: bool = false |  | ||||||
| 
 |  | ||||||
| ## After spawning one item, don't spawn any more. |  | ||||||
| @export var one_shot: bool = false |  | ||||||
| 
 |  | ||||||
| ## Spawn an item after this many turns. |  | ||||||
| ## 1 indicates the item should be spawned on the next turn. |  | ||||||
| ## 0 indicates the item should not be spawned based on turns. |  | ||||||
| @export var spawn_turns: int = 0 |  | ||||||
| 
 |  | ||||||
| ## Spawn an item after this many seconds. |  | ||||||
| ## Make sure this is long enough that a player won't just keep picking it up! |  | ||||||
| ## Values < 0 indicate the item should not be spawned based on time. |  | ||||||
| @export var spawn_time: float = -1 |  | ||||||
| 
 |  | ||||||
| var turns_to_spawn := -1 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| func _ready() -> void: |  | ||||||
| 	var world: World = get_tree().get_first_node_in_group(World.group) |  | ||||||
| 	if world: |  | ||||||
| 		world.manager.turn_started.connect(_on_turn_started) |  | ||||||
| 
 |  | ||||||
| 	if spawn_on_ready: |  | ||||||
| 		spawn() |  | ||||||
| 	else: |  | ||||||
| 		_set_spawn_conditions() |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| ## Spawn the item! |  | ||||||
| ## This can be called manually if an item needs complex spawning logic. |  | ||||||
| func spawn() -> void: |  | ||||||
| 	var instance: Item = item.instantiate() |  | ||||||
| 	instance.amount = amount |  | ||||||
| 	instance.on_collect.connect(_on_item_collected) |  | ||||||
| 	add_child(instance) |  | ||||||
| 
 |  | ||||||
| 	# Pop-in animation |  | ||||||
| 	instance.scale = Vector3.ONE * 1e-6 |  | ||||||
| 	var tween := create_tween() |  | ||||||
| 	tween.tween_property(instance, "scale", Vector3.ONE, POP_IN_TIME).set_trans(Tween.TRANS_SPRING) |  | ||||||
| 
 |  | ||||||
| 	item_spawned.emit(instance) |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| func _set_spawn_conditions() -> void: |  | ||||||
| 	if spawn_time >= 0: |  | ||||||
| 		get_tree().create_timer(spawn_time).timeout.connect(spawn) |  | ||||||
| 
 |  | ||||||
| 	if spawn_turns > 0: |  | ||||||
| 		turns_to_spawn = spawn_turns |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| func _on_item_collected(_player: WorldPlayer) -> void: |  | ||||||
| 	if not one_shot: |  | ||||||
| 		_set_spawn_conditions() |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| func _on_turn_started(_player: WorldPlayer) -> void: |  | ||||||
| 	turns_to_spawn -= 1 |  | ||||||
| 	if turns_to_spawn == 0: |  | ||||||
| 		spawn() |  | ||||||
| @ -16,17 +16,13 @@ const SCENE_MAP: Dictionary = { | |||||||
| 		ball = value | 		ball = value | ||||||
| 		ball_changed.emit(ball) | 		ball_changed.emit(ball) | ||||||
| 
 | 
 | ||||||
| @onready var shot_setup: ShotSetup = $".." |  | ||||||
| 
 |  | ||||||
| 
 | 
 | ||||||
| ## Get a new instance of a ball of the given type. | ## Get a new instance of a ball of the given type. | ||||||
| ## Returns null if the type can't be instantiated (e.g. NONE type) | ## Returns null if the type can't be instantiated (e.g. NONE type) | ||||||
| func get_instance(type: GameBall.Type) -> GameBall: | func get_instance(type: GameBall.Type) -> GameBall: | ||||||
| 	if type in SCENE_MAP: | 	if type in SCENE_MAP: | ||||||
| 		var scene: PackedScene = SCENE_MAP.get(type) | 		var scene: PackedScene = SCENE_MAP.get(type) | ||||||
| 		var instance: GameBall = scene.instantiate() | 		return scene.instantiate() as GameBall | ||||||
| 		instance.player = shot_setup.player |  | ||||||
| 		return instance |  | ||||||
| 	return null | 	return null | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -70,9 +70,8 @@ func set_balls(type: GameBall.Type, value: int) -> void: | |||||||
| 
 | 
 | ||||||
| ## Change the quantity of a ball type | ## Change the quantity of a ball type | ||||||
| func mutate_balls(type: GameBall.Type, delta: int) -> void: | func mutate_balls(type: GameBall.Type, delta: int) -> void: | ||||||
| 	if _balls.get(type, 0) >= 0: | 	_balls[type] = _balls.get(type, 0) + delta | ||||||
| 		_balls[type] = _balls.get(type, 0) + delta | 	on_balls_changed.emit(type, _balls[type]) | ||||||
| 		on_balls_changed.emit(type, _balls[type]) |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| ## Get next slotted ball type | ## Get next slotted ball type | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| shader_type spatial; | shader_type spatial; | ||||||
| // render_mode blend_mix, depth_draw_always, cull_disabled; | // render_mode blend_mix, depth_draw_always, cull_disabled; | ||||||
| render_mode diffuse_burley, specular_schlick_ggx, blend_mix, depth_draw_always, cull_back, sss_mode_skin; | render_mode diffuse_burley, specular_schlick_ggx, blend_mix, depth_draw_always, cull_disabled, sss_mode_skin; | ||||||
| 
 | 
 | ||||||
| group_uniforms albedo; | group_uniforms albedo; | ||||||
| uniform vec4 albedo: source_color = vec4(1.0, 1.0, 1.0, 0.0); | uniform vec4 albedo: source_color = vec4(1.0, 1.0, 1.0, 0.0); | ||||||
| @ -29,7 +29,6 @@ uniform vec4 edge_color: source_color = vec4(0.0, 0.0, 0.0, 1.0); | |||||||
| uniform float surface_contribution = 0.2; | uniform float surface_contribution = 0.2; | ||||||
| uniform float specular_contribution = 0.2; | uniform float specular_contribution = 0.2; | ||||||
| uniform float refraction_contribution = 1.0; | uniform float refraction_contribution = 1.0; | ||||||
| uniform float alpha = 1.0; |  | ||||||
| 
 | 
 | ||||||
| group_uniforms uv; | group_uniforms uv; | ||||||
| uniform vec3 uv1_scale = vec3(1.0); | uniform vec3 uv1_scale = vec3(1.0); | ||||||
| @ -74,5 +73,4 @@ void fragment() { | |||||||
| 	float ref_amount = 1.0 - albedo_mix.a; | 	float ref_amount = 1.0 - albedo_mix.a; | ||||||
| 	EMISSION += (textureLod(screen_texture,ref_ofs,ROUGHNESS * 8.0).rgb * ref_amount * EXPOSURE * mix(vec3(mix(0.02, 0.1, a)), albedo_mix.rgb*refraction_contribution, a))/a_factor_2; | 	EMISSION += (textureLod(screen_texture,ref_ofs,ROUGHNESS * 8.0).rgb * ref_amount * EXPOSURE * mix(vec3(mix(0.02, 0.1, a)), albedo_mix.rgb*refraction_contribution, a))/a_factor_2; | ||||||
| 	ALBEDO *= 1.0 - ref_amount; | 	ALBEDO *= 1.0 - ref_amount; | ||||||
| 	ALPHA = alpha; |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -1,91 +0,0 @@ | |||||||
| /* Spatial shine |  | ||||||
|  * Based on https://godotshaders.com/shader/radial-shine-highlight/ |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| shader_type spatial; |  | ||||||
| render_mode blend_mix, depth_draw_opaque, cull_back, unshaded, diffuse_burley, specular_schlick_ggx; |  | ||||||
| 
 |  | ||||||
| uniform sampler2D SCREEN_TEXTURE: hint_screen_texture, filter_linear_mipmap_anisotropic; |  | ||||||
| uniform sampler2D gradient; |  | ||||||
| uniform float spread = 0.5; |  | ||||||
| uniform float cutoff = 0.1; |  | ||||||
| uniform float size = 1.0; |  | ||||||
| uniform float speed = 1.0; |  | ||||||
| uniform float ray1_density = 8.0; |  | ||||||
| uniform float ray2_density = 30.0; |  | ||||||
| uniform float ray2_intensity = 0.3; |  | ||||||
| uniform float core_intensity = 2.0; |  | ||||||
| uniform bool hdr = false; |  | ||||||
| uniform float seed = 5.0; |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| uniform float grow : hint_range(-16.0, 16.0, 0.001); |  | ||||||
| 
 |  | ||||||
| uniform vec3 uv1_scale; |  | ||||||
| uniform vec3 uv1_offset; |  | ||||||
| uniform vec3 uv2_scale; |  | ||||||
| uniform vec3 uv2_offset; |  | ||||||
| 
 |  | ||||||
| float random(vec2 _uv) { |  | ||||||
|     return fract(sin(dot(_uv.xy, vec2(12.9898, 78.233))) * 43758.5453123); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| float noise(in vec2 uv) { |  | ||||||
|     vec2 i = floor(uv); |  | ||||||
|     vec2 f = fract(uv); |  | ||||||
|     float a = random(i); |  | ||||||
|     float b = random(i + vec2(1.0, 0.0)); |  | ||||||
|     float c = random(i + vec2(0.0, 1.0)); |  | ||||||
|     float d = random(i + vec2(1.0, 1.0)); |  | ||||||
|     vec2 u = f * f * (3.0-2.0 * f); |  | ||||||
|     return mix(a, b, u.x) + (c - a)* u.y * (1.0 - u.x) + (d - b) * u.x * u.y; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| vec4 screen(vec4 base, vec4 blend){ |  | ||||||
|     return 1.0 - (1.0 - base) * (1.0 - blend); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| void vertex() { |  | ||||||
| 	UV = UV * uv1_scale.xy + uv1_offset.xy; |  | ||||||
| 
 |  | ||||||
| 	// Billboard Mode: Enabled |  | ||||||
| 	MODELVIEW_MATRIX = VIEW_MATRIX * mat4( |  | ||||||
| 			MAIN_CAM_INV_VIEW_MATRIX[0], |  | ||||||
| 			MAIN_CAM_INV_VIEW_MATRIX[1], |  | ||||||
| 			MAIN_CAM_INV_VIEW_MATRIX[2], |  | ||||||
| 			MODEL_MATRIX[3]); |  | ||||||
| 	MODELVIEW_NORMAL_MATRIX = mat3(MODELVIEW_MATRIX); |  | ||||||
| 
 |  | ||||||
| 	// Grow: Enabled |  | ||||||
| 	VERTEX += NORMAL * grow; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| void fragment() { |  | ||||||
|     vec2 centered_uv = (UV - 0.5) * size; |  | ||||||
|     float radius = length(centered_uv); |  | ||||||
|     float angle = atan(centered_uv.y, centered_uv.x) + PI; // Add PI to fix left side cutoff |  | ||||||
|      |  | ||||||
|     vec2 ray1 = vec2(angle * ray1_density + TIME * speed + seed + sin(angle * 3.0), radius * 2.0); |  | ||||||
|     vec2 ray2 = vec2(angle * ray2_density + TIME * speed * 1.5 + seed + cos(angle * 2.0), radius * 2.0); |  | ||||||
|      |  | ||||||
|     float cut = 1.0 - smoothstep(cutoff, cutoff + 0.2, radius); |  | ||||||
|     ray1 *= cut; |  | ||||||
|     ray2 *= cut; |  | ||||||
|      |  | ||||||
|     float rays = hdr ?  |  | ||||||
|         noise(ray1) + (noise(ray2) * ray2_intensity) : |  | ||||||
|         clamp(noise(ray1) + (noise(ray2) * ray2_intensity), 0., 1.); |  | ||||||
|      |  | ||||||
|     rays *= smoothstep(spread, spread * 0.3, radius); |  | ||||||
|     float core = smoothstep(0.2, 0.0, radius) * core_intensity; |  | ||||||
|     rays += core; |  | ||||||
|      |  | ||||||
|     vec4 gradient_color = texture(gradient, vec2(rays, 0.5)); |  | ||||||
|     vec3 shine = vec3(rays) * gradient_color.rgb; |  | ||||||
|      |  | ||||||
|     float blur_amount = radius * 0.1; |  | ||||||
|     vec2 blur_uv = SCREEN_UV + centered_uv * blur_amount; |  | ||||||
|     vec4 blurred = texture(SCREEN_TEXTURE, blur_uv); |  | ||||||
|     ALBEDO = screen(blurred, vec4(shine, rays)).rgb; |  | ||||||
| 	ALPHA = rays * gradient_color.a; |  | ||||||
| } |  | ||||||
| @ -62,7 +62,6 @@ curve = SubResource("Curve3D_sj0rs") | |||||||
| 
 | 
 | ||||||
| [node name="Polygon" type="CSGPolygon3D" parent="Path"] | [node name="Polygon" type="CSGPolygon3D" parent="Path"] | ||||||
| unique_name_in_owner = true | unique_name_in_owner = true | ||||||
| sorting_offset = 126.0 |  | ||||||
| polygon = PackedVector2Array(0, -0.1, -0.2, 0, 0, 0.1, 0.2, 0) | polygon = PackedVector2Array(0, -0.1, -0.2, 0, 0, 0.1, 0.2, 0) | ||||||
| mode = 2 | mode = 2 | ||||||
| path_node = NodePath("..") | path_node = NodePath("..") | ||||||
|  | |||||||
| @ -1,9 +1,6 @@ | |||||||
| class_name PlayManager extends Resource | class_name PlayManager extends Resource | ||||||
| ## Abstract base type for strategies to manage the flow of gameplay | ## Abstract base type for strategies to manage the flow of gameplay | ||||||
| 
 | 
 | ||||||
| ## Emitted at the start of each new turn |  | ||||||
| signal turn_started(player: WorldPlayer) |  | ||||||
| 
 |  | ||||||
| ## List of game player instances | ## List of game player instances | ||||||
| @export var players: Array[WorldPlayer] = [] | @export var players: Array[WorldPlayer] = [] | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -11,7 +11,6 @@ func on_turn_finished(source: ShotSetup) -> void: | |||||||
| 	print_debug("Shot finished for ", source.player.name) | 	print_debug("Shot finished for ", source.player.name) | ||||||
| 	players.push_back(players.pop_front()) | 	players.push_back(players.pop_front()) | ||||||
| 	players[0].shot_setup.queue_restart() | 	players[0].shot_setup.queue_restart() | ||||||
| 	turn_started.emit(players[0]) |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| func on_player_death(player: WorldPlayer) -> void: | func on_player_death(player: WorldPlayer) -> void: | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user