rotation rework, deletion of complex objects

This commit is contained in:
Rendo 2025-10-16 19:47:52 +05:00
commit 8dcd7725a9
15 changed files with 103 additions and 147 deletions

View file

@ -0,0 +1,12 @@
extends Sprite2D
@export var textures : Array[Texture]
@export var structure : Structure
func _ready() -> void:
structure.changed_direction.connect(on_direction_changed)
func on_direction_changed(to: float, max_directions: int) -> void:
var indexed_direction = to*max_directions/TAU
texture = textures[indexed_direction]