mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 23:11:54 +08:00
6ed8278158
修改Pipe武器的子弹速度计算方式,使用平方根函数平滑速度增长 将Pipe子弹命中后的能量衰减系数从0.8改为0.6,加快能量消耗
15 lines
434 B
GDScript
15 lines
434 B
GDScript
extends BulletBase
|
|
class_name PipeBullet
|
|
|
|
var energy: float = 0
|
|
|
|
func ai():
|
|
PresetBulletAI.forward(self, rotation)
|
|
texture.rotation += initialSpeed * (1 - lifeTimePercent()) / 100
|
|
speed = initialSpeed * (1 - lifeTimePercent())
|
|
baseDamage = energy
|
|
func destroy(_beacuseMap: bool):
|
|
EffectController.create(ComponentManager.getEffect("PipeFall"), position).shot()
|
|
func succeedToHit(_dmg: float, _entity: EntityBase):
|
|
energy *= 0.6
|