public void ForceUnlocked(bool unlocked) { WorldStorage.SetUnlocked(ID, unlocked); if (unlocked) { Gate.OnOpened -= OnUnlocked; OnUnlocked(); } else { Gate.OnOpened += OnUnlocked; } }
private void SetCompleted(bool completed, bool recursive) { if (recursive) { foreach (var subWorldID in SubWorldsID) { GameKit.Config.GetWorldByID(subWorldID).SetCompleted(completed, true); } } WorldStorage.SetCompleted(ID, completed); if (completed) { OnCompleted(); } }