1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-19 17:49:47 +00:00
Pixelorama/src/Classes/Frame.gd
Manolis Papadeas 05c9ef70d4 Put frame duration as a member of the Frame class
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.
2020-12-16 22:54:08 +02:00

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