void BaseButtonClicked() { Campaign campaign = Globals.campaign; SaveStateBase save = new SaveStateBase(campaign); SaveLoadManager.AutoSaveCampaignProgress(save); SceneManager.LoadScene("BaseScene"); }
private void OnDisable() { CleanButtons(); ClearTalentButtons(); LearnSkillButton.button.onClick.RemoveAllListeners(); SaveStateBase state = new SaveStateBase(Globals.campaign); SaveLoadManager.AutoSaveCampaignProgress(state); }
private void StressTest(int level) { int mission = 50 * level; int items = 100 * level; int skills = 50 * level; int actors = 100 * level; for (int i = 0; i < mission; i++) { Mission m = Globals.campaign.GetMissionDataCopy("test_mission_00"); m.ChangeKey(i.ToString()); campaign.GetMissionHandler().AddMission(m); } for (int i = 0; i < items; i++) { Item item = (Item)campaign.GetItemCopy(("synth_helm")); item.ChangeKey(i.ToString()); campaign.GetAllItems().AddEntry(item); } for (int i = 0; i < skills; i++) { Skill item = (Skill)campaign.contentLibrary.skillDatabase.GetCopy("fire_ball"); item.ChangeKey(i.ToString()); campaign.contentLibrary.skillDatabase.AddEntry(item); } for (int i = 0; i < actors; i++) { ActorData item = (ActorData)campaign.contentLibrary.actorDB.GetCopy(("abagail")); item.ChangeKey(i.ToString()); campaign.contentLibrary.actorDB.AddEntry(item); } Debug.Log("Missions: " + mission + " Items: " + items + " Skills: " + skills + " Actors: " + actors); SaveStateBase sf = new SaveStateBase(campaign); SaveLoadManager.Savecampaign(campaign); }
// Use this for initialization void Start() { Globals.currState = GameState.Base; SaveStateBase stat = (SaveStateBase)(SaveLoadManager.LoadFile(FilePath.CurrentSaveFilePath)); campaign = stat.campaign; contentContainer = campaign.contentLibrary; baseUI.campaign = campaign; baseMap = Globals.campaign.GetMapDataContainer().mapDB.GetCopy(stat.baseID); atlas = Resources.Load <SpriteAtlas>(FilePath.TileSetAtlas); PrintBoard(); inputFSM = new InputFSM(new BlockUserInputState()); }