mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 15:01:53 +08:00
53412c0968
实现钢管武器的蓄力攻击机制,包括: - 添加 Pipe 武器和 PipeBullet 子弹脚本及场景 - 在 Weapon 类中增加蓄力相关属性和方法 - 修改 Rooster 角色以支持武器蓄力功能 - 添加武器蓄力时间计算和伤害加成逻辑
10 lines
224 B
GDScript
10 lines
224 B
GDScript
extends BulletBase
|
|
class_name PipeBullet
|
|
|
|
var energy: float = 0
|
|
|
|
func ai():
|
|
PresetBulletAI.forward(self, rotation)
|
|
texture.rotation += energy * (1 - lifeTimePercent()) / 100
|
|
speed = initialSpeed * (1 - lifeTimePercent())
|