1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-27 22:41:56 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Bullets/Volcano.gd
T
fallingshrimp 68259981f4 feat: 完善火山子弹相关内容与木羊犬属性
- 为火山子弹添加动画轨迹粒子与攻击速度适配逻辑
- 调整木羊犬的字段数值
- 修复子弹切割速度的缩放逻辑
- 新增能量最大值的实体属性处理器
2026-05-11 22:55:39 +08:00

39 lines
1.0 KiB
GDScript

extends BulletBase
class_name Volcano
@onready var textureSword: Sprite2D = $%textureSword
@onready var anchor: Node2D = $%anchor
var rotates: float = 0
var count: int = 0
var dmg5: float = 0
var splitAngle: float = 10
func spawn():
animator.speed_scale = launcher.fields[FieldStore.Entity.ATTACK_SPEED] * 0.75
setupCuttable(0.2)
func ai():
PresetBulletAI.lockLauncher(self , launcher, true)
rotation = lerp_angle(
rotation,
position.angle_to_point(launcher.currentFocusedPosition),
rotates
)
func succeedToHit(_dmg: float, entity: EntityBase):
entity.impluse((entity.getTrackingAnchor() - position).normalized() * 400)
ParryEntityEffect.createEffectEntity(entity, self )
func generateShadow():
var startAngle = rotation - deg_to_rad(count * splitAngle / 2)
for i in count:
for bullet in BulletBase.generate(
ComponentManager.getBullet("VolcanoShadow"),
launcher,
position,
startAngle + i * deg_to_rad(splitAngle),
true,
true
):
if bullet is VolcanoShadow:
bullet.baseDamage = baseDamage * dmg5