fixed roboturret turning when seeing blocks
This commit is contained in:
parent
1c232945dc
commit
519670e0cd
2 changed files with 8 additions and 7 deletions
|
@ -18,10 +18,11 @@ func _ready():
|
|||
|
||||
func _physics_process(delta):
|
||||
if raycast.is_colliding():
|
||||
if sign(shootpos.position.x) == -1:
|
||||
anims.play("turn right")
|
||||
else:
|
||||
anims.play("turn left")
|
||||
if raycast.get_collider().is_in_group("player_hitbox"):
|
||||
if sign(shootpos.position.x) == -1:
|
||||
anims.play("turn right")
|
||||
else:
|
||||
anims.play("turn left")
|
||||
#Do not charge up offscreen
|
||||
if Game.get_sector(position) != Game.current_sector: timer.start()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue