Enemy Hivemind became Room Manager, will probably pull out the actual enemy script at some point

This commit is contained in:
derek
2024-11-07 11:21:21 -06:00
parent fa054ad3ed
commit 168963163a
25 changed files with 283 additions and 121 deletions

View File

@@ -1,5 +1,6 @@
extends Node3D
@export_enum("Enemy", "Trap") var enemy_type: int
@export var damage : float = 1
@export var pushback : float = 5
@onready var outline_meshes = [$Spikes1/MeshInstance3D]
@@ -17,5 +18,5 @@ func _process(delta: float) -> void:
func _on_area_3d_body_entered(body: Node3D) -> void:
if body.is_in_group("player"):
body.hit(damage,self)
body.hit(damage,self,enemy_type)
body.velocity = ray_cast.global_transform.basis * Vector3(0,0,-pushback)