mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-27 22:41:56 +08:00
12 lines
212 B
GDScript
12 lines
212 B
GDScript
|
|
extends BulletBase
|
||
|
|
class_name Arrow
|
||
|
|
|
||
|
|
var atk: float = 0
|
||
|
|
|
||
|
|
func ai():
|
||
|
|
speed = (1 - lifeDistancePercent()) * initialSpeed
|
||
|
|
damage = speed * atk
|
||
|
|
PresetBulletAI.forward(self, rotation)
|
||
|
|
if speed < 1:
|
||
|
|
tryDestroy()
|