1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-31 08:21:54 +08:00

fix(Characters): 修复KukeChild在masterMine无效时崩溃的问题

refactor(Bullets): 重写Volcano子弹的旋转逻辑和动画
火山子弹现在会跟随鼠标指向,并添加了新的攻击动画

feat(Weapons): 更新Volcano武器的属性和行为
调整伤害、旋转速度等属性,移除多子弹生成逻辑

chore: 为Rooster角色添加Volcano武器
This commit is contained in:
2025-11-16 12:43:20 +08:00
parent 2cc8cae962
commit 259b856f90
6 changed files with 115 additions and 35 deletions
+7 -1
View File
@@ -3,6 +3,12 @@ class_name Volcano
var rotates: float = 0
func register():
animator.speed_scale = launcher.fields.get(FieldStore.Entity.ATTACK_SPEED)
func ai():
PresetBulletAI.selfRotate(self, rotates)
PresetBulletAI.lockLauncher(self, launcher, true)
rotation = lerp_angle(
rotation,
position.angle_to_point(get_global_mouse_position()),
rotates
)
+2 -1
View File
@@ -21,4 +21,5 @@ func attack(type):
elif type == 1:
BulletBase.generate(ComponentManager.getBullet("HeavyCrystal"), self, findWeaponAnchor("normal"), position.angle_to_point(currentFocusedBoss.position))
func kill():
masterMine.tryHeal(100)
if is_instance_valid(masterMine):
masterMine.tryHeal(100)
+6 -8
View File
@@ -3,14 +3,12 @@ extends Weapon
func update(to: int, origin: Dictionary, _entity: EntityBase):
origin["atk"] += 3 * to * soulLevel
origin["count"] = soulLevel + 1
origin["rotate"] += 0.05 * to * soulLevel
origin["rotate"] += 0.015 * to * soulLevel
origin["life"] += 0.1 * to * soulLevel
return origin
func attack(entity: EntityBase):
for i in readStore("count"):
for j in BulletBase.generate(ComponentManager.getBullet("Volcano"), entity, entity.findWeaponAnchor("normal"), deg_to_rad(360.0 / readStore("count") * i), false, false, true, true):
var bullet: Volcano = j
bullet.damage = readStore("atk")
bullet.rotates = readStore("rotate")
bullet.lifeTime = readStore("life") * 1000
for j in BulletBase.generate(ComponentManager.getBullet("Volcano"), entity, entity.findWeaponAnchor("normal"), entity.position.angle_to_point(entity.get_global_mouse_position()), false, false, true, true):
var bullet: Volcano = j
bullet.damage = readStore("atk")
bullet.rotates = readStore("rotate")
bullet.lifeTime = readStore("life") * 1000