Fixes bug where ouroboroses stop turning when you lose the game

master
TechieDamien 2025-08-01 11:52:48 +01:00
parent fb766bba52
commit 6899c1063c
Signed by: TechieDamien
GPG Key ID: 2ACE3574E164B780
1 changed files with 4 additions and 1 deletions

View File

@ -2,8 +2,11 @@ extends Sprite2D
const ROTATION_SPEED = 0.2
var last_rotation_mult = 1
func _process(delta: float) -> void:
var head = get_tree().get_first_node_in_group("Head")
if head is SnakePart:
rotate(delta * ROTATION_SPEED * (head.colour_index + 1))
modulate = head.COLOURS[head.colour_index]
last_rotation_mult = head.colour_index + 1
rotate(delta * ROTATION_SPEED * last_rotation_mult)