diff --git a/core/DynamicPolygon.tscn b/core/dynamic_polygon.tscn similarity index 67% rename from core/DynamicPolygon.tscn rename to core/dynamic_polygon.tscn index 5b003b2..041ae0c 100644 --- a/core/DynamicPolygon.tscn +++ b/core/dynamic_polygon.tscn @@ -1,14 +1,14 @@ [gd_scene load_steps=3 format=3 uid="uid://cbynoofsjcl45"] -[ext_resource type="Script" path="res://core/dynamic_polygon.gd" id="1_2pai0"] +[ext_resource type="Script" path="res://core/dynamic_polygon.gd" id="1_ga37f"] -[sub_resource type="OccluderPolygon2D" id="OccluderPolygon2D_fkh4m"] +[sub_resource type="OccluderPolygon2D" id="OccluderPolygon2D_ucwen"] [node name="DynamicPolygon" type="CollisionPolygon2D"] -script = ExtResource("1_2pai0") +script = ExtResource("1_ga37f") [node name="Polygon2D" type="Polygon2D" parent="."] [node name="LightOccluder2D" type="LightOccluder2D" parent="."] editor_description = "For particle collisions" -occluder = SubResource("OccluderPolygon2D_fkh4m") +occluder = SubResource("OccluderPolygon2D_ucwen") diff --git a/core/rain.tscn b/core/rain.tscn new file mode 100644 index 0000000..5543de4 --- /dev/null +++ b/core/rain.tscn @@ -0,0 +1,26 @@ +[gd_scene load_steps=2 format=3 uid="uid://b8cjp6hiqycxe"] + +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_v306m"] +particle_flag_disable_z = true +emission_shape_scale = Vector3(512, 0, 1) +emission_shape = 3 +emission_box_extents = Vector3(1, 1, 1) +direction = Vector3(0, 1, 0) +spread = 0.0 +initial_velocity_min = 300.0 +initial_velocity_max = 400.0 +gravity = Vector3(0, 98, 0) +scale_max = 1.5 +color = Color(1, 1, 1, 0.5) +collision_mode = 2 + +[node name="Rain" type="GPUParticles2D"] +amount = 2048 +amount_ratio = 0.5 +process_material = SubResource("ParticleProcessMaterial_v306m") +lifetime = 2.5 +preprocess = 3.0 +fixed_fps = 0 +visibility_rect = Rect2(-512, 0, 1024, 1024) +trail_enabled = true +trail_lifetime = 0.03 diff --git a/levels/waking_up.tscn b/levels/waking_up.tscn index fe6b90c..583c8af 100644 --- a/levels/waking_up.tscn +++ b/levels/waking_up.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=3 format=3 uid="uid://ptqto8ctsp4u"] [ext_resource type="PackedScene" uid="uid://ebb4pfxklatj" path="res://player/player.tscn" id="1_h1tob"] -[ext_resource type="PackedScene" uid="uid://cbynoofsjcl45" path="res://core/DynamicPolygon.tscn" id="2_83sm2"] +[ext_resource type="PackedScene" uid="uid://cbynoofsjcl45" path="res://core/dynamic_polygon.tscn" id="2_83sm2"] [node name="WakingUp" type="Node2D"] diff --git a/player/player.tscn b/player/player.tscn index f155c0b..f93e270 100644 --- a/player/player.tscn +++ b/player/player.tscn @@ -1,22 +1,7 @@ -[gd_scene load_steps=4 format=3 uid="uid://ebb4pfxklatj"] +[gd_scene load_steps=3 format=3 uid="uid://ebb4pfxklatj"] [ext_resource type="Script" path="res://player/player.gd" id="1_fob34"] -[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_v306m"] -particle_flag_disable_z = true -emission_shape_scale = Vector3(640, 300, 1) -emission_shape = 3 -emission_box_extents = Vector3(1, 1, 1) -direction = Vector3(0, 1, 0) -spread = 0.0 -initial_velocity_min = 300.0 -initial_velocity_max = 400.0 -gravity = Vector3(0, 0, 0) -scale_min = 2.0 -scale_max = 2.5 -color = Color(1, 1, 1, 0.75) -collision_mode = 2 - [sub_resource type="RectangleShape2D" id="RectangleShape2D_7cq61"] size = Vector2(16, 16) @@ -30,16 +15,6 @@ position_smoothing_enabled = true drag_horizontal_enabled = true drag_vertical_enabled = true -[node name="Rain" type="GPUParticles2D" parent="Camera2D"] -position = Vector2(0, -640) -amount = 2048 -amount_ratio = 0.5 -process_material = SubResource("ParticleProcessMaterial_v306m") -lifetime = 3.0 -preprocess = 5.0 -fixed_fps = 0 -visibility_rect = Rect2(-512, 320, 1024, 640) - [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("RectangleShape2D_7cq61")