tweaks to ai, pickup drops, and added scene image capturerer
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
extends EnemyState
|
||||
class_name EnemySearch
|
||||
|
||||
@export var max_search_time : float = 10.0
|
||||
@export var scan_time : float = 3
|
||||
@export var scan_cone_angle : float = 90
|
||||
|
||||
var search_timer = max_search_time
|
||||
var scan_timer
|
||||
var scan_direction = scan_cone_angle/2
|
||||
|
||||
@@ -11,13 +14,17 @@ func Enter():
|
||||
get_new_point_of_interest()
|
||||
|
||||
func Update(delta):
|
||||
update_minimap(0,1.0,ColorSwatch.ORANGE_COLOR)
|
||||
attack_on_sight()
|
||||
#on timeout change scan direction
|
||||
if scan_timer > 0:
|
||||
scan_timer -= delta
|
||||
if search_timer > 0:
|
||||
search_timer -= delta
|
||||
update_minimap(0,1.0,ColorSwatch.ORANGE_COLOR)
|
||||
attack_on_sight()
|
||||
#on timeout change scan direction
|
||||
if scan_timer > 0:
|
||||
scan_timer -= delta
|
||||
else:
|
||||
change_scan_direction()
|
||||
else:
|
||||
change_scan_direction()
|
||||
Transitioned.emit(self,"idle")
|
||||
|
||||
func Physics_Update(delta):
|
||||
#draw target for debug purposes
|
||||
|
||||
Reference in New Issue
Block a user