mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-19 17:49:47 +00:00
05c9ef70d4
Instead of having a frame_duration[] array in the Project class. This makes the code much more readable and understandable, using less lines of code and, by avoiding an extra array, we also avoid potential out-of-bound array crashes. The functionality for the user has not changed, and by testing so far I didn't find any issues.
13 lines
265 B
GDScript
13 lines
265 B
GDScript
class_name Frame extends Reference
|
|
# A class for frame properties.
|
|
# A frame is a collection of cels, for each layer.
|
|
|
|
|
|
var cels : Array # An array of Cels
|
|
var duration := 1.0
|
|
|
|
|
|
func _init(_cels := [], _duration := 1.0) -> void:
|
|
cels = _cels
|
|
duration = _duration
|