(wip) advanced langtons ant
(wip) advanced langtons ant
This commit is contained in:
18
langtons-ant/grid.gd
Normal file
18
langtons-ant/grid.gd
Normal file
@@ -0,0 +1,18 @@
|
||||
extends Node2D
|
||||
|
||||
var t: float = 0
|
||||
@export var speed: float = 58
|
||||
@export var ant: Sprite2D
|
||||
@export var tiles: TileMapLayer
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
t += delta
|
||||
if (t > 60-speed):
|
||||
t = 0
|
||||
ant.update()
|
||||
Reference in New Issue
Block a user