state("PillarsOfLight") {} startup { Assembly.Load(File.ReadAllBytes("Components/asl-help")).CreateInstance("Unity"); } init { vars.Helper.TryLoad = (Func)(mono => { vars.Helper["levelIndex"] = mono.Make("AutosplitVariables", "levelIndex"); vars.Helper["isLoading"] = mono.Make("AutosplitVariables", "isLoading"); vars.Helper["isPaused"] = mono.Make("AutosplitVariables", "isPaused"); vars.Helper["internalTimerIsActivated"] = mono.Make("AutosplitVariables", "internalTimerIsActivated"); return true; }); } update { } start { return current.internalTimerIsActivated && current.levelIndex > 0; } split { return current.levelIndex > old.levelIndex && old.levelIndex > 0; } isLoading { return current.isLoading || current.isPaused; } reset { /* If you're in the main menu with a playtime of 0, you probably just reset your save file, * and you definitely aren't in a current run, so reset the timer. */ return !current.internalTimerIsActivated; } exit { } shutdown { }