comments
This commit is contained in:
@@ -13,6 +13,7 @@ func Enter():
|
|||||||
get_new_wander_point()
|
get_new_wander_point()
|
||||||
|
|
||||||
func Update(delta):
|
func Update(delta):
|
||||||
|
#on timeout change scan direction
|
||||||
if scan_timer > 0:
|
if scan_timer > 0:
|
||||||
scan_timer -= delta
|
scan_timer -= delta
|
||||||
else:
|
else:
|
||||||
@@ -21,11 +22,13 @@ func Update(delta):
|
|||||||
func Physics_Update(delta):
|
func Physics_Update(delta):
|
||||||
#draw target for debug purposes
|
#draw target for debug purposes
|
||||||
debug_marker(move_target)
|
debug_marker(move_target)
|
||||||
|
|
||||||
#if navigation is finished get new point, otherwise continue on path
|
#if navigation is finished get new point, otherwise continue on path
|
||||||
if enemy.nav_agent.is_navigation_finished():
|
if enemy.nav_agent.is_navigation_finished():
|
||||||
get_new_wander_point()
|
get_new_wander_point()
|
||||||
else:
|
else:
|
||||||
move_to_nav_point(delta)
|
move_to_nav_point(delta)
|
||||||
|
|
||||||
#do turret scan
|
#do turret scan
|
||||||
turret_scan_look(enemy.nav_agent.get_next_path_position(),scan_direction,delta)
|
turret_scan_look(enemy.nav_agent.get_next_path_position(),scan_direction,delta)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user