public void InitMenu(BoardManager boardManager) { this.boardManager = boardManager; selector = boardManager.Selector; inputFSM = boardManager.inputFSM; }
// Start is called before the first frame update void Start() { GenerateDemoCampaign de = new GenerateDemoCampaign(); s += "Debug" + "\n"; debug.text = s; currentCampaign = SaveLoadManager.LoadFile(FilePath.CampaignFolder + default_campaign_name) as Campaign; currentCampaign = de.campaign; inputStateMachine = new InputFSM(new BlockUserInputState()); }
private void InitInputState() { worldMapelectorInstance.InitSelector(this); worldMapelectorInstance.MoveSelectorTo(playerAvatarGO.position.X, playerAvatarGO.position.Y); NavigateWorldInputState currstate = new NavigateWorldInputState(this, worldMapUIManager); worldMapInput = new InputFSM(currstate); }
public void NewInput() { if (currentAction.IsChoiceAction()) { stateMachine = new InputFSM(new CutsceneChoiceState(this, currentAction as ChoiceAction, CinematicStatus.RelationshipScene)); } else if (currentAction.IsDialogueAction()) { stateMachine = new InputFSM(new CutsceneDialoguInput(this, cs, currentAction)); } else { //our default input state stateMachine = new InputFSM(new BlockUserInputState()); StartCoroutine(currentAction.ExecuteAction(this)); } }
// 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()); }
void Start() { _instance = this; //Just a testing thing if (Globals.campaign == null) { Debug.Log("DEPENDICIES INJECTED"); GenerateDemoCampaign dcm = new GenerateDemoCampaign(); Globals.campaign = dcm.campaign; campaign = dcm.campaign; party = campaign.currentparty; currentMission = campaign.GetMissionData("test_mission_00"); currentMission.started = false; SavedFileMission state = new SavedFileMission(campaign, currentMission); FilePath.CurrentSaveFilePath = SaveLoadManager.GenerateSaveStateFilePath(state.campaign.GetFileName()); SaveLoadManager.AutoSaveCampaignProgress(state); } else { campaign = Globals.campaign; party = campaign.currentparty; } //Actual initialization starts here Globals.currState = GameState.Combat; SavedFileMission file = SaveLoadManager.LoadFile(FilePath.CurrentSaveFilePath) as SavedFileMission; currentMission = file.currentMission; currMap = Globals.campaign.GetMapDataContainer().mapDB.GetCopy(currentMission.mapName); if (currentMission.started) { for (int x = 0; x < currMap.sizeX; x++) { for (int y = 0; y < currMap.sizeY; y++) { currMap.tileBoard[x, y] = file.TileTypeStates[x, y].GetKey(); } } } inputFSM = new InputFSM(new BlockUserInputState()); atlas = Resources.Load <SpriteAtlas>(FilePath.TileSetAtlas); GenerateBoard(); //we are loading a mission if (currentMission.started) { StartBattleFromLoad(); for (int x = 0; x < currMap.sizeX; x++) { for (int y = 0; y < currMap.sizeY; y++) { pathfinding.tiles[x, y].tileGO.ChangeTileType(file.TileTypeStates[x, y]); foreach (TileEffect effect in file.TileEffectStates[x, y]) { if (effect is AuraTileEffect) { //pathfinding.tiles[x, y].AddTileEffect(effect.Copy() as AuraTileEffect); } else { pathfinding.tiles[x, y].AddTileEffect(effect.Copy() as TileEffect); } } } } turnManager.globalTurnSpeed = file.currentTurnSpeed; } else // we starting a new mission { Globals.cutsceneData = null; InitBattledata(); //ui.TurnOffInfoPanels(); currentMission.started = true; } }
public GameplayInput() { InputFSM = new InputFSM(); }