Show network Ping & start AI behaviour tree
This commit is contained in:
9
scenes/map/NearEnemy.gd
Normal file
9
scenes/map/NearEnemy.gd
Normal file
@@ -0,0 +1,9 @@
|
||||
extends BTCondition
|
||||
class_name NearEnemy
|
||||
|
||||
@export var player_detection_distance:int = 50
|
||||
|
||||
func tick(actor:Node2D, _blackboard:BTBlackboard) -> int:
|
||||
if actor.enemies_in_range.size() > 0:
|
||||
return BTTickResult.SUCCESS
|
||||
return BTTickResult.FAILURE
|
||||
Reference in New Issue
Block a user