mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-11-10 20:45:35 +01:00
23 lines
472 B
Plaintext
23 lines
472 B
Plaintext
#region anomation class
|
|
function AnimationManager() constructor {
|
|
frames_total = 30;
|
|
current_frame = 0;
|
|
real_frame = 0;
|
|
framerate = 30;
|
|
is_playing = false;
|
|
frame_progress = false;
|
|
|
|
playback = ANIMATOR_END.loop;
|
|
|
|
static setFrame = function(frame) {
|
|
frame = clamp(frame, 0, frames_total - 1);
|
|
real_frame = frame;
|
|
current_frame = round(frame);
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region object
|
|
globalvar ANIMATOR;
|
|
ANIMATOR = new AnimationManager();
|
|
#endregion |