forked from team-sg/hero-mark-2
fix turtles breaking after restart :/
This commit is contained in:
parent
071ff439b9
commit
172ecd3235
1 changed files with 1 additions and 5 deletions
|
@ -21,10 +21,6 @@ func _ready() -> void:
|
|||
# don't act in the editor
|
||||
if Engine.editor_hint:
|
||||
return
|
||||
|
||||
# scale to be in tiles
|
||||
for i in spike_positions.size():
|
||||
spike_positions[i] = spike_positions[i] * 8.0
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
# update debug graphics in editor
|
||||
|
@ -52,7 +48,7 @@ func _physics_process(delta: float) -> void:
|
|||
return
|
||||
# spike if close enough to an activation point
|
||||
for spike_pos in spike_positions:
|
||||
if abs(pos_start + spike_pos - pos) <= 2.0:
|
||||
if abs(pos_start + (spike_pos * 8.0) - pos) <= 2.0:
|
||||
spike()
|
||||
break
|
||||
# slightly different logic depending on forward/backwards unfortunately :I
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue