1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-27 22:41:56 +08:00

refactor(Volcano bullet): 优化火山弹相关逻辑

1. 新增spawn方法并设置可切割属性
2. 调整命中时的冲量大小从500改为400
3. 为动画添加hitbox显隐切换轨道
This commit is contained in:
2026-05-11 22:11:31 +08:00
parent 97f52a5dda
commit 53d1be6749
2 changed files with 27 additions and 1 deletions
+24
View File
@@ -67,6 +67,18 @@ tracks/4/keys = {
"update": 1,
"values": [0]
}
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("%hitbox:disabled")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="Animation" id="Animation_oinqg"]
resource_name = "destroy"
@@ -175,6 +187,18 @@ tracks/6/keys = {
"update": 1,
"values": [6, 0, 6]
}
tracks/7/type = "value"
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/path = NodePath("%hitbox:disabled")
tracks/7/interp = 1
tracks/7/loop_wrap = true
tracks/7/keys = {
"times": PackedFloat32Array(0, 0.05, 0.2, 0.7, 0.9, 1.2, 1.35, 1.65, 1.8),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1),
"update": 1,
"values": [true, false, true, false, true, false, true, false, true]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_w1utg"]
_data = {
+3 -1
View File
@@ -9,6 +9,8 @@ var count: int = 0
var dmg5: float = 0
var splitAngle: float = 10
func spawn():
setupCuttable(0.2)
func ai():
PresetBulletAI.lockLauncher(self , launcher, true)
rotation = lerp_angle(
@@ -17,7 +19,7 @@ func ai():
rotates
)
func succeedToHit(_dmg: float, entity: EntityBase):
entity.impluse((entity.getTrackingAnchor() - position).normalized() * 500)
entity.impluse((entity.getTrackingAnchor() - position).normalized() * 400)
ParryEntityEffect.createEffectEntity(entity, self )
func generateShadow():