1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 15:01:53 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Effects/ParryEntity.gd
T

14 lines
452 B
GDScript
Raw Normal View History

extends ParryEffect
class_name ParryEntityEffect
func beforeShot():
CameraManager.shake(50, 200)
static func createEffectEntity(entity: EntityBase, by: BulletBase):
if by is ParrierBullet:
by.parryiedTimes += 1
var eff = EffectController.create(ComponentManager.getEffect("ParryEntity"), entity.position)
eff.rotation = by.position.angle_to_point(entity.position)
eff.shot()
entity.impluse((entity.position - by.position).normalized() * 450)