fixed death cam fov and added damage numbers

This commit is contained in:
derek
2024-08-07 15:57:48 -05:00
parent 795e1ae7f6
commit fb1dd498b4
12 changed files with 258 additions and 46 deletions

View File

@@ -2,6 +2,8 @@ extends Area3D
@export var damage :=1
var damage_number = preload("res://assets/damage_number.tscn")
signal body_part_hit(dam,bullet_damage)
# Called when the node enters the scene tree for the first time.
@@ -15,3 +17,8 @@ func _process(delta):
func hit(bullet_damage):
emit_signal("body_part_hit", damage, bullet_damage)
var number_spawn = damage_number.instantiate()
number_spawn.damage_amt = bullet_damage * damage
number_spawn.position = global_position + Vector3(0,2,0)
get_tree().get_root().add_child(number_spawn)