mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-27 22:41:56 +08:00
68259981f4
- 为火山子弹添加动画轨迹粒子与攻击速度适配逻辑 - 调整木羊犬的字段数值 - 修复子弹切割速度的缩放逻辑 - 新增能量最大值的实体属性处理器
39 lines
1.0 KiB
GDScript
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
|