Show network Ping & start AI behaviour tree

This commit is contained in:
2023-01-22 23:44:41 +01:00
parent ce7b74c832
commit 26f17fbd03
89 changed files with 2839 additions and 53 deletions

View File

@@ -2,9 +2,20 @@ extends Node
class_name Hitable
var health = 200
var enemies_in_range = []
func Hit(dmg):
#var tween = create_tween()
health -= dmg
if(health <= 0):
queue_free()
func _on_area_3d_body_entered(body):
if body.get_collision_layer() == 10:
enemies_in_range.append(body)
func _on_area_3d_body_exited(body):
if body.get_collision_layer() == 10:
enemies_in_range.erase(body)