1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-12 22:57:13 +08:00

feat(BulletBase): 添加自动销毁动画功能

为子弹基类添加 autoDestroyAnimation 导出变量,当设置为 true 时会在销毁时播放销毁动画
This commit is contained in:
2025-08-29 11:37:25 +08:00
parent 96430162b4
commit 7a56644b45
2 changed files with 11 additions and 1 deletions
+7 -1
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=7 format=3 uid="uid://crtdkysmnkith"]
[gd_scene load_steps=8 format=3 uid="uid://crtdkysmnkith"]
[ext_resource type="Script" path="res://scripts/Statemachine/BulletBase.gd" id="1_pklpq"]
@@ -24,8 +24,14 @@ tracks/0/keys = {
[sub_resource type="Animation" id="Animation_kmogx"]
resource_name = "spawn"
[sub_resource type="Animation" id="Animation_oinqg"]
resource_name = "destroy"
length = 0.5
step = 0.1
[sub_resource type="AnimationLibrary" id="AnimationLibrary_dxweq"]
_data = {
"destroy": SubResource("Animation_oinqg"),
"loop": SubResource("Animation_ynxlt"),
"spawn": SubResource("Animation_kmogx")
}