feat: reorganized logic + camera

This commit is contained in:
2025-11-12 15:39:40 +01:00
parent bee8cdeeef
commit fa6e5d9582
12 changed files with 124 additions and 100 deletions

View File

@@ -1,19 +1,24 @@
extends Node2D
var t: float = 0
@export var speed: float = 58
@export var stepSize: float = 2
@export var ant: Sprite2D
@export var tiles: TileMapLayer
var t: float = -1
var paused: bool = false
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass
func _input(event):
if event.is_action_pressed("togglePause"):
paused = !paused
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
if paused: return
t += delta
if (t > 60-speed):
if (t > stepSize/100):
t = 0
ant.update()
#tiles.render_next()