1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-30 16:01:53 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Bullets/PurpleCrystal.gd
T

18 lines
487 B
GDScript
Raw Normal View History

extends BulletBase
class_name PurpleCrystalBullet
var cycleRate: float = 0
var cycleCount: float = 0
var cycled: bool = false
func ai():
PresetBulletAI.forward(self , rotation)
func destroy(_beacuseMap: bool):
var eff = EffectController.create(ComponentManager.getEffect("PurpleCrystalExplosion"), global_position)
eff.rotation = rotation
eff.shot()
func succeedToHit(_dmg: float, entity: EntityBase):
if MathTool.rate(cycleRate):
entity.storeEnergy(cycleCount)
cycled = true