improvements to ai but still needs a lot of work
This commit is contained in:
@@ -13,15 +13,6 @@ const WANDER_AMT = 50
|
||||
const TURRET_TURN_AMT : float = 90.0
|
||||
const TURRET_SCAN_SPEED : float = .5
|
||||
|
||||
func search_point():
|
||||
enemy.nav_agent.set_target_position(enemy.point_of_interest)
|
||||
search_time = randf_range(3,10)
|
||||
|
||||
func randomize_turret_scan():
|
||||
scan_direction = -scan_direction
|
||||
enemy.turret_look_next.rotation = Vector3(0,scan_direction,0)
|
||||
scan_time = randf_range(5,10)
|
||||
|
||||
func Enter():
|
||||
super()
|
||||
search_point()
|
||||
@@ -56,3 +47,12 @@ func Physics_Update(delta : float):
|
||||
|
||||
if enemy.turret_look.is_colliding() and enemy.turret_look.get_collider() is Player:
|
||||
Transitioned.emit(self,"attack")
|
||||
|
||||
func search_point():
|
||||
enemy.nav_agent.set_target_position(move_target())
|
||||
search_time = randf_range(3,10)
|
||||
|
||||
func randomize_turret_scan():
|
||||
scan_direction = -scan_direction
|
||||
enemy.turret_look_next.rotation = Vector3(0,scan_direction,0)
|
||||
scan_time = randf_range(5,10)
|
||||
|
||||
Reference in New Issue
Block a user