(wip) Food now moves with a world flow (which is updated using a manual timer in the GameManager
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user