void LevelComplete() { string levelName = gameObject.scene.name; string[] levelIdentity = levelName.Split('.'); int currentChapterIndex = int.Parse(levelIdentity[0]); int currentLevelIndex = int.Parse(levelIdentity[1]); taskHandlerClass.UpdateLevelTaskState(ObjectsDescription.Player, TaskTypes.Hover, TaskCategory.ImmediateActionTask, new List <string>() { (!ballCameToRest).ToString() }); taskHandlerClass.UpdateLevelTaskState(ObjectsDescription.Player, TaskTypes.NoHit, TaskCategory.ImmediateActionTask, new List <string>() { (playerStats.chaptersList[currentChapterIndex].LevelsInChapter[currentLevelIndex].numTimesLevelFailed == 0).ToString() }); taskHandlerClass.UpdateLevelTaskState(ObjectsDescription.Player, TaskTypes.NoNearMiss, TaskCategory.ImmediateActionTask, new List <string>() { }); taskHandlerClass.FinalizeTasks(); }