瀏覽代碼

:art: Create thrust effect

DricomDragon 1 年之前
父節點
當前提交
6bdc4a8bef

+ 30 - 1
godot/component/ships/BiBiShip.tscn

@@ -1,11 +1,34 @@
-[gd_scene load_steps=39 format=3 uid="uid://dlkwtp1gl45r"]
+[gd_scene load_steps=43 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"]
 
 [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_disable_z = true
+direction = Vector3(0, 1, 0)
+spread = 0.0
+gravity = Vector3(0, 0, 0)
+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)
 
@@ -286,6 +309,12 @@ physics_material_override = SubResource("PhysicsMaterial_g1gqc")
 linear_damp = 0.5
 script = ExtResource("1_8hr01")
 
+[node name="GPUParticles2D" type="GPUParticles2D" parent="."]
+position = Vector2(0, 348)
+amount = 4
+process_material = SubResource("ParticleProcessMaterial_ybpux")
+texture = ExtResource("2_ox3u6")
+
 [node name="BiBiShip" type="TileMap" parent="."]
 tile_set = SubResource("TileSet_pl6km")
 format = 2

二進制
godot/effect/thrust/thrust_line.png


+ 34 - 0
godot/effect/thrust/thrust_line.png.import

@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://b71okcm85d6iu"
+path="res://.godot/imported/thrust_line.png-6884bca60bf6f13164acb3ba88f361b1.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://effect/thrust/thrust_line.png"
+dest_files=["res://.godot/imported/thrust_line.png-6884bca60bf6f13164acb3ba88f361b1.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=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1

二進制
godot/effect/trail/trail_particle.png


+ 34 - 0
godot/effect/trail/trail_particle.png.import

@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://dfjwcx4506cxo"
+path="res://.godot/imported/trail_particle.png-dc29fb1f052f8699179a59844252ca9e.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://effect/trail/trail_particle.png"
+dest_files=["res://.godot/imported/trail_particle.png-dc29fb1f052f8699179a59844252ca9e.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=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1

+ 1 - 1
godot/project.godot

@@ -21,6 +21,6 @@ config/icon="res://icon.svg"
 
 [rendering]
 
-renderer/rendering_method="gl_compatibility"
+renderer/rendering_method="mobile"
 renderer/rendering_method.mobile="gl_compatibility"
 environment/defaults/default_clear_color=Color(0.662745, 0.72549, 1, 1)