Added 'extra ball' items for brick & plasma ball

This commit is contained in:
Rob Kelly 2024-12-13 12:06:41 -07:00
parent def4fc3ebf
commit 06de956e1a
16 changed files with 457 additions and 61 deletions

Binary file not shown.

View File

@ -21,5 +21,6 @@ shader_parameter/edge_color = Color(0, 1, 1.2, 1)
shader_parameter/surface_contribution = 0.2 shader_parameter/surface_contribution = 0.2
shader_parameter/specular_contribution = 0.5 shader_parameter/specular_contribution = 0.5
shader_parameter/refraction_contribution = 10.0 shader_parameter/refraction_contribution = 10.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)

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=64 format=3 uid="uid://bm2o3mex10v11"] [gd_scene load_steps=65 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"]
@ -6,13 +6,14 @@
[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/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://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"]
@ -219,6 +220,7 @@ 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)
@ -377,6 +379,20 @@ item = ExtResource("13_ydvlu")
one_shot = true one_shot = true
spawn_turns = 2 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")
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")
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)
@ -405,8 +421,12 @@ 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="GfolfGirl" parent="Course" instance=ExtResource("10_8tu3b")] [node name="BrickItemSpawner" type="Marker3D" parent="Course"]
transform = Transform3D(0.909686, 0, 0.415297, 0, 1, 0, -0.415297, 0, 0.909686, 537.767, 4, 452.434) transform = Transform3D(0.909686, 0, 0.415297, 0, 1, 0, -0.415297, 0, 0.909686, 537.767, 5.1, 452.434)
script = ExtResource("8_5kaye")
item = ExtResource("12_tj0lh")
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)
@ -423,8 +443,12 @@ 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="Item" parent="CityBuildings/ConcreteBuilding3" instance=ExtResource("13_ydvlu")] [node name="PlasmaBallSpawner" type="Marker3D" parent="CityBuildings/ConcreteBuilding3"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 25.5, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 25.5, 0)
script = ExtResource("8_5kaye")
item = ExtResource("15_ir4ss")
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)

View File

@ -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.0322548, -0.997872, -0.0566729, 0.999469, -0.0324597, 0.00269911, -0.00453275, -0.0565558, 0.998389, -2.5177, 5.22011, -0.51637) 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)
bone_name = "Hand.R" bone_name = "Hand.R"
bone_idx = 11 bone_idx = 11

View File

@ -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_xqofq"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_s3hrj"]
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_xqofq") material = SubResource("StandardMaterial3D_s3hrj")
radius = 0.05 radius = 0.05
height = 0.1 height = 0.1
radial_segments = 6 radial_segments = 6

View File

@ -9,14 +9,14 @@ 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_oxhrr"] [sub_resource type="CurveTexture" id="CurveTexture_v8ki1"]
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_vfusk"] [sub_resource type="CurveTexture" id="CurveTexture_wkho1"]
curve = SubResource("Curve_77lhu") curve = SubResource("Curve_77lhu")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_uffe8"] [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_uffe8"]
@ -26,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_vfusk") scale_curve = SubResource("CurveTexture_wkho1")
emission_curve = SubResource("CurveTexture_oxhrr") emission_curve = SubResource("CurveTexture_v8ki1")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_7ptri"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_tyfsm"]
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)
@ -44,7 +44,7 @@ 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_7ptri") material = SubResource("StandardMaterial3D_tyfsm")
size = Vector2(0.4, 0.4) size = Vector2(0.4, 0.4)
[node name="PlasmaBall" instance=ExtResource("1_yh4fp")] [node name="PlasmaBall" instance=ExtResource("1_yh4fp")]
@ -52,6 +52,7 @@ script = ExtResource("2_16fhh")
magnetic = true magnetic = true
[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")

View File

@ -0,0 +1,119 @@
[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 = -1
[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"]

View File

@ -0,0 +1,16 @@
class_name ExtraBall extends Item
## Item which grants extra balls when picked up.
## Type of ball which will be replenished.
@export var ball_type: GameBall.Type
## Amount to grant.
## Values < 0 will instead grant the player unlimited ammunition of this type.
@export var amount: int = -1
func _collect(player: WorldPlayer) -> void:
if amount < 0:
player.set_balls(ball_type, -1)
else:
player.mutate_balls(ball_type, amount)

View File

@ -0,0 +1,226 @@
[gd_scene load_steps=22 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="Texture2D" uid="uid://ckhiq6rfjv63u" path="res://assets/textures/gfolfball/gfolfball.png" id="6_qn15y"]
[ext_resource type="Texture2D" uid="uid://btntjs7mbdigu" path="res://assets/textures/gfolfball/gfolfball_normal.png" id="7_kyc21"]
[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="StandardMaterial3D" id="StandardMaterial3D_xqofq"]
albedo_texture = ExtResource("6_qn15y")
albedo_texture_force_srgb = true
metallic = 0.27
roughness = 0.67
normal_enabled = true
normal_scale = 0.2
normal_texture = ExtResource("7_kyc21")
clearcoat_roughness = 0.0
uv1_scale = Vector3(3, 1.5, 3)
texture_filter = 4
[sub_resource type="SphereMesh" id="SphereMesh_2r4nb"]
material = SubResource("StandardMaterial3D_xqofq")
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.2
gravity = Vector3(0, 2.4, 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(2, 0, 0, 0, 2, 0, 0, 0, 2, 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
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"
[node name="Skeleton3D" parent="gfolf_girl/Armature" index="0"]
bones/2/scale = Vector3(1, 1, 1)
bones/3/scale = Vector3(1, 1, 1)
bones/4/scale = Vector3(1, 1, 1)
bones/6/scale = Vector3(1, 1, 1)
bones/8/scale = Vector3(1, 1, 1)
bones/11/scale = Vector3(1, 1, 1)
bones/12/scale = Vector3(1, 1, 1)
bones/13/scale = Vector3(1, 1, 1)
bones/20/scale = Vector3(1, 1, 1)
bones/21/rotation = Quaternion(-0.000222673, 0.707107, 0.707107, 0.000222504)
bones/21/scale = Vector3(1, 1, 1)
bones/22/scale = Vector3(1, 1, 1)
bones/23/scale = Vector3(1, 1, 1)
[editable path="Pivot/Octahedron"]
[editable path="gfolf_girl"]

View File

@ -6,14 +6,19 @@ signal on_collect(player: WorldPlayer)
@onready var explosion_player: AnimationPlayer = %ExplosionPlayer @onready var explosion_player: AnimationPlayer = %ExplosionPlayer
func _collect(player: WorldPlayer) -> void: func collect(player: WorldPlayer) -> void:
# Note that this animation will call `queue_free` in 5 seconds! # Note that this animation will call `queue_free` in 5 seconds!
explosion_player.play("explode") explosion_player.play("explode")
_collect(player)
on_collect.emit(player) on_collect.emit(player)
func _collect(_player: WorldPlayer) -> void:
pass # Defined in derived type
func _on_collection_area_body_entered(body: Node3D) -> void: func _on_collection_area_body_entered(body: Node3D) -> void:
if body is GameBall: if body is GameBall:
var ball: GameBall = body var ball: GameBall = body
if ball.player: if ball.player:
_collect(ball.player) collect(ball.player)

View File

@ -285,6 +285,45 @@ particles_anim_loop = false
material = SubResource("StandardMaterial3D_ttptx") material = SubResource("StandardMaterial3D_ttptx")
size = Vector2(0.05, 0.05) 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"] [sub_resource type="Animation" id="Animation_niure"]
resource_name = "explode" resource_name = "explode"
length = 5.0 length = 5.0
@ -339,45 +378,6 @@ tracks/3/keys = {
}] }]
} }
[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="AnimationLibrary" id="AnimationLibrary_lqra6"] [sub_resource type="AnimationLibrary" id="AnimationLibrary_lqra6"]
_data = { _data = {
"RESET": SubResource("Animation_50jqd"), "RESET": SubResource("Animation_50jqd"),

View File

@ -47,7 +47,7 @@ func spawn() -> void:
add_child(instance) add_child(instance)
# Pop-in animation # Pop-in animation
instance.scale = Vector3.ZERO instance.scale = Vector3.ONE * 1e-6
var tween := create_tween() var tween := create_tween()
tween.tween_property(instance, "scale", Vector3.ONE, POP_IN_TIME).set_trans(Tween.TRANS_SPRING) tween.tween_property(instance, "scale", Vector3.ONE, POP_IN_TIME).set_trans(Tween.TRANS_SPRING)

View File

@ -70,8 +70,9 @@ 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:
_balls[type] = _balls.get(type, 0) + delta if _balls[type] >= 0:
on_balls_changed.emit(type, _balls[type]) _balls[type] = _balls.get(type, 0) + delta
on_balls_changed.emit(type, _balls[type])
## Get next slotted ball type ## Get next slotted ball type

View File

@ -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_disabled, sss_mode_skin; render_mode diffuse_burley, specular_schlick_ggx, blend_mix, depth_draw_always, cull_back, 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,6 +29,7 @@ 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);
@ -73,4 +74,5 @@ 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;
} }

View File

@ -62,6 +62,7 @@ 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("..")