Skip to main content

PlaytimeTracker

Kindclass
Packagebackend
Full namebackend.PlaytimeTracker
Sourcesource/backend/PlaytimeTracker.hx
ExtendsFlxBasic
Compiled when#if ACHIEVEMENTS_ALLOWED

Tracks cumulative time spent with the game running and awards the playtime badge.

Public methods​

new (constructor)​

function new()

Only compiled when #if ACHIEVEMENTS_ALLOWED.

View source

update​

override function update(elapsed:Float):Void

Only compiled when #if ACHIEVEMENTS_ALLOWED.

ParameterTypeDefault
elapsedFloat—

View source

Internals​

Private / internal members
FieldTypeStatic
ACHIEVEMENT_IDStringyes
TARGET_HOURSFloatyes
SAVE_INTERVAL_SECONDSFloatyes
pendingSecondsFloatno
Method
function onApplicationExit(_:Int):Void
function savePendingTime():Void