gun system + minigun
This commit is contained in:
parent
84415d5aca
commit
f73f093ae2
13 changed files with 84 additions and 24 deletions
|
|
@ -3,6 +3,8 @@ extends CharacterBody3D
|
|||
|
||||
@export var dot_curve: Curve
|
||||
|
||||
var health := 10.
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
%NavAgent.target_position = Player.instance.global_position
|
||||
|
||||
|
|
@ -15,8 +17,11 @@ func _physics_process(delta: float) -> void:
|
|||
|
||||
rotation.y = Vector2(velocity.x, -velocity.z).angle()
|
||||
|
||||
func hit(_proj: PlayerProjectile) -> bool:
|
||||
queue_free()
|
||||
func hit(_proj: PlayerProjectile, damage: float) -> bool:
|
||||
health -= damage
|
||||
if health <= 0:
|
||||
queue_free()
|
||||
|
||||
return true
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue