(wip) Food now moves with a world flow (which is updated using a manual timer in the GameManager

This commit is contained in:
2026-02-07 16:24:37 +01:00
parent d5b33d66b8
commit bef1e9cb53
4 changed files with 49 additions and 4 deletions

View File

@@ -5,11 +5,17 @@ extends Area2D
@export var val: int = 1
@export var food_name: String = "Food"
@export var flow_carry_speed: float = 10.0
signal consumed
func _ready() -> void:
pass
func _physics_process(delta: float) -> void:
var dpos = Vector2(GameManager.flow_x, GameManager.flow_y) * delta * flow_carry_speed
position += dpos
func _on_body_entered(body: Node2D) -> void:
pass