// Update is called once per frame void Update() { if (objective1Completed) { if (!objective1C) { objective1C = true; gameUI.objective1Toggle.isOn = true; playStats.objectivesCompleted = playStats.objectivesCompleted + 1; playStats.xpEarned = playStats.xpEarned + xpForCompletingTheTutorial; } if (!finishingMission) { gameUI.FinishMission(); } } if (optionalObjectivesCompleted == 3) { if (!objectiveOptionalC) { objectiveOptionalC = true; playStats.xpEarned = playStats.xpEarned + 100; core.UnlockAchievement(1); } } }