Changes input to not allow instant death by reversing direction (begrudgingly by popular request)
parent
23b73dd5f6
commit
3b2c5c2103
|
@ -398,7 +398,7 @@ func _unhandled_input(event: InputEvent) -> void:
|
||||||
# Change direction if we are the head
|
# Change direction if we are the head
|
||||||
if event is InputEventKey and part_type == PartTypes.HEAD:
|
if event is InputEventKey and part_type == PartTypes.HEAD:
|
||||||
for dir in inputs.keys():
|
for dir in inputs.keys():
|
||||||
if event.is_action_pressed(dir):
|
if event.is_action_pressed(dir) and current_direction != -inputs[dir]:
|
||||||
current_direction = inputs[dir]
|
current_direction = inputs[dir]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue