public GameHandler(string saveId) { this.saveId = saveId; // Make sure the Saves directory exists. Systems.filesLocal.MakeDirectory("Saves/" + saveId); Systems.filesLocal.MakeDirectory("Saves/" + saveId + "/Campaign"); // Content this.levelContent = new LevelContent(); this.worldContent = new WorldContent(); // State this.campaignState = new CampaignState(this); this.levelState = new LevelState(this); this.playlistState = new PlaylistState(this); }
// Complete Level public void CompleteLevel(Character character) { this.FullReset(); // Update Campaign Benefits, if applicable. CampaignState campaign = Systems.handler.campaignState; if (campaign.worldId.Length > 0) { campaign.SetUpgradesByCharacter(character); campaign.ProcessLevelCompletion(this.levelId); SceneTransition.ToWorld(campaign.worldId); return; } // If we arrive here, there was no world to return to. SceneTransition.ToPlanetSelection(); }