PlaytimeTracker
| Kind | class |
| Package | backend |
| Full name | backend.PlaytimeTracker |
| Source | source/backend/PlaytimeTracker.hx |
| Extends | FlxBasic |
| 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.
update
override function update(elapsed:Float):Void
Only compiled when #if ACHIEVEMENTS_ALLOWED.
| Parameter | Type | Default |
|---|---|---|
elapsed | Float | — |
Internals
Private / internal members
| Field | Type | Static |
|---|---|---|
ACHIEVEMENT_ID | String | yes |
TARGET_HOURS | Float | yes |
SAVE_INTERVAL_SECONDS | Float | yes |
pendingSeconds | Float | no |
| Method |
|---|
function onApplicationExit(_:Int):Void |
function savePendingTime():Void |