player and snake movement

This commit is contained in:
Tabby 2025-08-07 22:45:24 +10:00
parent 4576c62e4a
commit 50e2dad3e7
7 changed files with 113 additions and 23 deletions

18
snakeManager.gd Normal file
View file

@ -0,0 +1,18 @@
extends Node2D
@export var segements : Array[snake_segment]
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
#segements = get_children() as Array[snake_segment]
segements.assign(get_children())
for i in segements.size():
if i == 0:
segements[i].is_head = true
else:
segements[i].next_segment = segements[i-1]
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass