1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Bullets/Volcano.gd
T
fallingshrimp c52d293718 refactor(Bullets): 重构格挡子弹逻辑并提取特效创建方法
将ParrierBullet中的特效创建逻辑提取到ParryEffect和ParryEntityEffect类中
修改Volcano子弹的碰撞形状为矩形并更新相关特效调用
调整MuyangDog角色的默认武器为Volcano
统一多个子弹脚本中的函数调用空格格式
2026-05-10 22:30:22 +08:00

36 lines
930 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 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() * 500)
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