mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 23:11:54 +08:00
15 lines
390 B
GDScript
15 lines
390 B
GDScript
|
|
extends BulletBase
|
||
|
|
class_name QKSwordHandler
|
||
|
|
|
||
|
|
func succeedToHit(_dmg: float, entity: EntityBase):
|
||
|
|
for bullet in BulletBase.generate(
|
||
|
|
ComponentManager.getBullet("QKSword"),
|
||
|
|
launcher,
|
||
|
|
entity.position,
|
||
|
|
0
|
||
|
|
):
|
||
|
|
if bullet is QKSwordBullet:
|
||
|
|
bullet.position = entity.texture.global_position + MathTool.sampleInRing(50, 200)
|
||
|
|
bullet.tracer = entity
|
||
|
|
bullet.look_at(entity.position)
|