mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-07-10 20:12:54 +08:00
feat(子弹效果): 为七魂子弹添加粒子效果并调整颜色逻辑
修改子弹脚本以支持粒子效果发射 调整颜色应用逻辑从heart节点转移到父节点 为SoulBall和SevenSoul场景添加粒子系统配置
This commit is contained in:
@@ -1,9 +1,32 @@
|
|||||||
[gd_scene load_steps=4 format=3 uid="uid://bymprh2qel2oj"]
|
[gd_scene load_steps=9 format=3 uid="uid://bymprh2qel2oj"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_c4fl5"]
|
[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_c4fl5"]
|
||||||
[ext_resource type="Script" path="res://scripts/Contents/Bullets/SevenSoul.gd" id="2_egs34"]
|
[ext_resource type="Script" path="res://scripts/Contents/Bullets/SevenSoul.gd" id="2_egs34"]
|
||||||
[ext_resource type="Texture2D" uid="uid://wy10fc3bqppg" path="res://resources/bullets/seven-soul/soul.png" id="2_itucu"]
|
[ext_resource type="Texture2D" uid="uid://wy10fc3bqppg" path="res://resources/bullets/seven-soul/soul.png" id="2_itucu"]
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id="Curve_0y25k"]
|
||||||
|
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.497908, 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_d1eej"]
|
||||||
|
curve = SubResource("Curve_0y25k")
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id="Curve_acuqr"]
|
||||||
|
max_value = 4.0
|
||||||
|
_data = [Vector2(0, 1), 0.0, 3.0, 0, 1, Vector2(1, 4), 0.0, 0.0, 0, 0]
|
||||||
|
point_count = 2
|
||||||
|
|
||||||
|
[sub_resource type="CurveTexture" id="CurveTexture_cokmd"]
|
||||||
|
curve = SubResource("Curve_acuqr")
|
||||||
|
|
||||||
|
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_4d30u"]
|
||||||
|
particle_flag_disable_z = true
|
||||||
|
gravity = Vector3(0, 0, 0)
|
||||||
|
scale_min = 1.5
|
||||||
|
scale_max = 1.5
|
||||||
|
scale_curve = SubResource("CurveTexture_cokmd")
|
||||||
|
alpha_curve = SubResource("CurveTexture_d1eej")
|
||||||
|
|
||||||
[node name="SevenSoul" instance=ExtResource("1_c4fl5")]
|
[node name="SevenSoul" instance=ExtResource("1_c4fl5")]
|
||||||
script = ExtResource("2_egs34")
|
script = ExtResource("2_egs34")
|
||||||
lifeTime = 112000.0
|
lifeTime = 112000.0
|
||||||
@@ -14,5 +37,16 @@ position = Vector2(100, 0)
|
|||||||
scale = Vector2(1.5, 1.5)
|
scale = Vector2(1.5, 1.5)
|
||||||
texture = ExtResource("2_itucu")
|
texture = ExtResource("2_itucu")
|
||||||
|
|
||||||
|
[node name="effect" type="GPUParticles2D" parent="texture" index="2"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
position = Vector2(100, 0)
|
||||||
|
emitting = false
|
||||||
|
amount = 1
|
||||||
|
process_material = SubResource("ParticleProcessMaterial_4d30u")
|
||||||
|
texture = ExtResource("2_itucu")
|
||||||
|
lifetime = 0.5
|
||||||
|
one_shot = true
|
||||||
|
local_coords = true
|
||||||
|
|
||||||
[node name="hitbox" parent="." index="1"]
|
[node name="hitbox" parent="." index="1"]
|
||||||
disabled = true
|
disabled = true
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ curve = SubResource("Curve_orogq")
|
|||||||
particle_flag_disable_z = true
|
particle_flag_disable_z = true
|
||||||
direction = Vector3(-1, 0, 0)
|
direction = Vector3(-1, 0, 0)
|
||||||
spread = 0.0
|
spread = 0.0
|
||||||
|
initial_velocity_min = 300.0
|
||||||
|
initial_velocity_max = 300.0
|
||||||
gravity = Vector3(0, 0, 0)
|
gravity = Vector3(0, 0, 0)
|
||||||
scale_curve = SubResource("CurveTexture_pftyf")
|
scale_curve = SubResource("CurveTexture_pftyf")
|
||||||
alpha_curve = SubResource("CurveTexture_5wobk")
|
alpha_curve = SubResource("CurveTexture_5wobk")
|
||||||
@@ -52,6 +54,7 @@ amount = 10
|
|||||||
process_material = SubResource("ParticleProcessMaterial_vwon6")
|
process_material = SubResource("ParticleProcessMaterial_vwon6")
|
||||||
texture = ExtResource("2_fmlef")
|
texture = ExtResource("2_fmlef")
|
||||||
lifetime = 0.5
|
lifetime = 0.5
|
||||||
|
local_coords = true
|
||||||
|
|
||||||
[node name="hitbox" parent="." index="1"]
|
[node name="hitbox" parent="." index="1"]
|
||||||
visible = false
|
visible = false
|
||||||
|
|||||||
@@ -11,9 +11,11 @@ var colors = [
|
|||||||
var index = 0
|
var index = 0
|
||||||
|
|
||||||
@onready var heart = $"%heart"
|
@onready var heart = $"%heart"
|
||||||
|
@onready var effect: GPUParticles2D = $"%effect"
|
||||||
|
|
||||||
func spawn():
|
func spawn():
|
||||||
heart.modulate = Color(colors[index % colors.size()])
|
modulate = Color(colors[index % colors.size()])
|
||||||
|
effect.emitting = true
|
||||||
func ai():
|
func ai():
|
||||||
rotation_degrees = 360.0 / colors.size() * index + timeLived() / 20000.0 * 360 - index / 6.0 * 360.0
|
rotation_degrees = 360.0 / colors.size() * index + timeLived() / 20000.0 * 360 - index / 6.0 * 360.0
|
||||||
heart.global_rotation_degrees = 0
|
heart.global_rotation_degrees = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user