This commit is contained in:
Victor Turgeon
2022-10-11 21:21:27 -04:00
parent 4973e22d23
commit d31b299251
15 changed files with 261 additions and 24 deletions

View File

@@ -10,6 +10,7 @@ enum HitboxType{
export var hitbox_type = HitboxType.Unassigned
var slap_level = 0
var slap_vector = Vector3()
var slap_kill = 0
func _init():
collision_layer = 2

View File

@@ -15,6 +15,6 @@ func _on_area_entered(hitbox: HitBox):
return
if hitbox.hitbox_type == hitbox.HitboxType.Slap and owner.has_method("get_slapped"):
owner.get_slapped(hitbox.slap_level, hitbox.slap_vector)
owner.get_slapped(hitbox.slap_level,hitbox.slap_kill, hitbox.slap_vector)
elif hitbox.hitbox_type == hitbox.HitboxType.Projectile and owner.has_method("get_shot"):
owner.get_shot()
owner.get_shot(hitbox.owner)