1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 15:01:53 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Bullets/Volcano.gd
T
fallingshrimp 33e6758965 refactor(Bullet): 移除ChickSprint的atk变量并简化伤害计算
调整Cat角色的攻击冷却时间和冲刺倍数
为BulletBase添加speedScale属性和setupCuttable方法
将Volcano的animator速度设置移至ai方法并应用speedScale
2025-11-23 06:51:48 +08:00

35 lines
881 B
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 register():
setupCuttable(0.1)
func ai():
animator.speed_scale = launcher.fields.get(FieldStore.Entity.ATTACK_SPEED) * speedScale
PresetBulletAI.lockLauncher(self, launcher, true)
rotation = lerp_angle(
rotation,
position.angle_to_point(get_global_mouse_position()),
rotates
)
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),
false, false, true, true
):
if bullet is VolcanoShadow:
bullet.baseDamage = baseDamage * dmg5