mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-07-02 00:02:13 +08:00
feat(特效): 添加血雨效果及关联逻辑
为狐狸爪子弹添加血雨特效,当攻击公鸡角色时触发。同时新增相关资源文件和粒子系统配置。
This commit is contained in:
@@ -0,0 +1,32 @@
|
|||||||
|
[gd_scene load_steps=6 format=3 uid="uid://bh6u8paviqwpi"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bcvuuy2m0pke0" path="res://components/Abstracts/EffectBase.tscn" id="1_mkxf8"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cy4u4bvvv4r2n" path="res://resources/effects/flood.png" id="2_quyoi"]
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id="Curve_quyoi"]
|
||||||
|
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||||
|
point_count = 2
|
||||||
|
|
||||||
|
[sub_resource type="CurveTexture" id="CurveTexture_iyojt"]
|
||||||
|
curve = SubResource("Curve_quyoi")
|
||||||
|
|
||||||
|
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_quyoi"]
|
||||||
|
particle_flag_disable_z = true
|
||||||
|
emission_shape = 1
|
||||||
|
emission_sphere_radius = 50.0
|
||||||
|
direction = Vector3(0, -1, 0)
|
||||||
|
initial_velocity_min = 50.0
|
||||||
|
initial_velocity_max = 200.0
|
||||||
|
gravity = Vector3(0, 200, 0)
|
||||||
|
scale_min = 0.049999997
|
||||||
|
scale_max = 0.049999997
|
||||||
|
alpha_curve = SubResource("CurveTexture_iyojt")
|
||||||
|
|
||||||
|
[node name="BloodFall" instance=ExtResource("1_mkxf8")]
|
||||||
|
|
||||||
|
[node name="particles" parent="." index="1"]
|
||||||
|
amount = 5
|
||||||
|
texture = ExtResource("2_quyoi")
|
||||||
|
lifetime = 2.0
|
||||||
|
randomness = 1.0
|
||||||
|
process_material = SubResource("ParticleProcessMaterial_quyoi")
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 72 KiB |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cy4u4bvvv4r2n"
|
||||||
|
path="res://.godot/imported/flood.png-85f0dcbcd4bf1a7f90d70fe0bbca9854.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://resources/effects/flood.png"
|
||||||
|
dest_files=["res://.godot/imported/flood.png-85f0dcbcd4bf1a7f90d70fe0bbca9854.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
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/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
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,4 +1,5 @@
|
|||||||
extends BulletBase
|
extends BulletBase
|
||||||
|
class_name FoxZhua
|
||||||
|
|
||||||
@export var canTrace: bool = true
|
@export var canTrace: bool = true
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,11 @@ func register():
|
|||||||
attackCooldownMap[0] = 200
|
attackCooldownMap[0] = 200
|
||||||
attackCooldownMap[1] = 6000
|
attackCooldownMap[1] = 6000
|
||||||
hit.connect(
|
hit.connect(
|
||||||
func(_damage: float, _bullet: BulletBase, _crit: bool):
|
func(_damage: float, bullet: BulletBase, _crit: bool):
|
||||||
EffectController.create(ComponentManager.getEffect("FeatherFall"), texture.global_position).shot()
|
if bullet is DogCircle:
|
||||||
|
EffectController.create(ComponentManager.getEffect("FeatherFall"), texture.global_position).shot()
|
||||||
|
elif bullet is FoxZhua:
|
||||||
|
EffectController.create(ComponentManager.getEffect("BloodFall"), texture.global_position).shot()
|
||||||
)
|
)
|
||||||
func ai():
|
func ai():
|
||||||
texture.play("walk")
|
texture.play("walk")
|
||||||
|
|||||||
Reference in New Issue
Block a user