Przeglądaj źródła

:wrench: Add 3 thrust effects

DricomDragon 1 rok temu
rodzic
commit
b13c62b0f6

+ 12 - 36
godot/component/ships/BiBiShip.tscn

@@ -1,38 +1,12 @@
-[gd_scene load_steps=44 format=3 uid="uid://dlkwtp1gl45r"]
+[gd_scene load_steps=40 format=3 uid="uid://dlkwtp1gl45r"]
 
 [ext_resource type="Texture2D" uid="uid://duw5x0fjt8jak" path="res://component/ships/NihilAce_spaceship_building_pack_32x32.png" id="1_4y72e"]
 [ext_resource type="Script" path="res://component/ships/ship.gd" id="1_8hr01"]
-[ext_resource type="Texture2D" uid="uid://b71okcm85d6iu" path="res://effect/thrust/thrust_line.png" id="2_ox3u6"]
-[ext_resource type="Script" path="res://effect/thrust/thrust_effect.gd" id="3_y7m5h"]
+[ext_resource type="PackedScene" uid="uid://cm4nfeaf4e2rl" path="res://effect/thrust/thrust_effect.tscn" id="2_qj0sy"]
 
 [sub_resource type="PhysicsMaterial" id="PhysicsMaterial_g1gqc"]
 friction = 0.21
 
-[sub_resource type="Curve" id="Curve_adm55"]
-max_value = 2.0
-_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), -1.93548, 0.0, 0, 0]
-point_count = 2
-
-[sub_resource type="CurveTexture" id="CurveTexture_41ehx"]
-curve = SubResource("Curve_adm55")
-
-[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_ybpux"]
-lifetime_randomness = 0.14
-particle_flag_align_y = true
-particle_flag_disable_z = true
-direction = Vector3(0, 1, 0)
-spread = 0.0
-gravity = Vector3(0, 0, 0)
-initial_velocity_min = 0.1
-initial_velocity_max = 0.1
-orbit_velocity_min = 0.0
-orbit_velocity_max = 0.0
-angle_min = -4.0
-angle_max = 4.0
-scale_min = 1.5
-scale_max = 2.0
-scale_curve = SubResource("CurveTexture_41ehx")
-
 [sub_resource type="TileMapPattern" id="TileMapPattern_uebyg"]
 tile_data = PackedInt32Array(0, 851968, 3, 65536, 851968, 4, 1, 917504, 3, 65537, 917504, 4)
 
@@ -313,13 +287,13 @@ physics_material_override = SubResource("PhysicsMaterial_g1gqc")
 linear_damp = 0.5
 script = ExtResource("1_8hr01")
 
-[node name="ThrustEffect" type="GPUParticles2D" parent="."]
-position = Vector2(0, 348)
-amount = 4
-process_material = SubResource("ParticleProcessMaterial_ybpux")
-texture = ExtResource("2_ox3u6")
-local_coords = true
-script = ExtResource("3_y7m5h")
+[node name="ThrustEffectMid" parent="." instance=ExtResource("2_qj0sy")]
+
+[node name="ThrustEffectLeft" parent="." instance=ExtResource("2_qj0sy")]
+position = Vector2(-64, 316)
+
+[node name="ThrustEffectRight" parent="." instance=ExtResource("2_qj0sy")]
+position = Vector2(64, 316)
 
 [node name="BiBiShip" type="TileMap" parent="."]
 tile_set = SubResource("TileSet_pl6km")
@@ -334,4 +308,6 @@ shape = SubResource("CapsuleShape2D_scyxd")
 position = Vector2(0, 184.5)
 shape = SubResource("RectangleShape2D_54thx")
 
-[connection signal="thrusted" from="." to="ThrustEffect" method="_on_thrusted"]
+[connection signal="thrusted" from="." to="ThrustEffectMid" method="_on_thrusted"]
+[connection signal="thrusted" from="." to="ThrustEffectLeft" method="_on_thrusted"]
+[connection signal="thrusted" from="." to="ThrustEffectRight" method="_on_thrusted"]

+ 37 - 0
godot/effect/thrust/thrust_effect.tscn

@@ -0,0 +1,37 @@
+[gd_scene load_steps=6 format=3 uid="uid://cm4nfeaf4e2rl"]
+
+[ext_resource type="Texture2D" uid="uid://b71okcm85d6iu" path="res://effect/thrust/thrust_line.png" id="1_0466v"]
+[ext_resource type="Script" path="res://effect/thrust/thrust_effect.gd" id="2_lphc2"]
+
+[sub_resource type="Curve" id="Curve_adm55"]
+max_value = 2.0
+_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), -1.93548, 0.0, 0, 0]
+point_count = 2
+
+[sub_resource type="CurveTexture" id="CurveTexture_41ehx"]
+curve = SubResource("Curve_adm55")
+
+[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_ybpux"]
+lifetime_randomness = 0.14
+particle_flag_align_y = true
+particle_flag_disable_z = true
+direction = Vector3(0, 1, 0)
+spread = 0.0
+gravity = Vector3(0, 0, 0)
+initial_velocity_min = 0.1
+initial_velocity_max = 0.1
+orbit_velocity_min = 0.0
+orbit_velocity_max = 0.0
+angle_min = -4.0
+angle_max = 4.0
+scale_min = 1.5
+scale_max = 2.0
+scale_curve = SubResource("CurveTexture_41ehx")
+
+[node name="ThrustEffect" type="GPUParticles2D"]
+position = Vector2(0, 348)
+amount = 4
+process_material = SubResource("ParticleProcessMaterial_ybpux")
+texture = ExtResource("1_0466v")
+local_coords = true
+script = ExtResource("2_lphc2")