mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
d3cc2f94c1
- 为 ChickSprint 子弹添加 atk 属性并调整伤害计算 - 猫角色攻击时设置 ChickSprint 子弹的 atk 为 0.2 - 调整 Bow 子弹的生成延迟和角度计算精度 - 将 Bow 的箭矢数量从 1 增加到 2 - 增强 Arrow 子弹的速度、射程和视觉效果
23 lines
523 B
GDScript
23 lines
523 B
GDScript
extends BulletBase
|
|
class_name Bow
|
|
|
|
var count: int = 0
|
|
var atk: float = 0
|
|
|
|
func spawn():
|
|
await TickTool.millseconds(1000)
|
|
var startAngle = rotation - deg_to_rad(count * 10.0 / 2)
|
|
for c in count:
|
|
for i in BulletBase.generate(
|
|
ComponentManager.getBullet("Arrow"),
|
|
launcher,
|
|
position,
|
|
startAngle + deg_to_rad(c * 10.0)
|
|
):
|
|
var bullet: Arrow = i
|
|
bullet.atk = atk
|
|
tryDestroy()
|
|
func ai():
|
|
PresetBulletAI.lockLauncher(self, launcher, true)
|
|
rotation = position.angle_to_point(get_global_mouse_position())
|