1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
local AUTO_SAVING_UPDATE_TIME_S = 60
local TIME_AFTER_SAVE_COMPLETE_TO_FADE_S = 0.5
return autoSaving
end
self . spinnerFadeAnimation = GetAnimationManager ( ) : CreateTimelineFromVirtual ( "AutoSaveFade" , spinner )
self . spinnerFadeAnimation : SetHandler ( "OnStop" , function ( timeline , completed ) self : HideAutoSavingAnimComplete ( timeline , completed ) end )
self . spinnerSpinAnimation = GetAnimationManager ( ) : CreateTimelineFromVirtual ( "AutoSaveSpin" , spinner )
control : SetHandler ( "OnUpdate" , function ( _ , currentFrameTimeSeconds ) self : OnUpdate ( currentFrameTimeSeconds ) end )
EVENT_MANAGER : RegisterForEvent ( "AutoSaving" , EVENT_SAVE_DATA_START , function ( ) self : ShowAutoSaving ( ) end )
EVENT_MANAGER : RegisterForEvent ( "AutoSaving" , EVENT_SAVE_DATA_COMPLETE , function ( ) self : LogSaveCompleted ( ) end )
end
end
end
end
--Autosave every minute if dirty
end
end
end
end
end
if ( completed ) then
end
end
end
end
end |