void Start() { //linking the local statAllocation to the statAllocationButtons UI and the historyallocation statAllocation.statAllocationButtons = statAllocationButtons; // Get objects currentState = CreateAPlayerStates.MENU; // Initiate transition status lastActionWasNext = true; // Get the questions strings RefQuestions = dataBaseManager.getArrayData("select * from REF_Dialogues where Context='CharacterCreation' order by Id asc"); // Getting the status of each save slots PlayerAccountStatsBefore = dataBaseManager.getArrayData("select * from PlayerAccountStats", "BlueStarDataWarehouse.db"); }
void Start() { // Get objects currentState = CreateAPlayerStates.MENU; Stand.SetActive(false); Player.SetActive(false); // Initiate selections HellCircleSelection=0; AllegianceSelection=0; GenusSelection=0; SpeciesSelection = 0; JobSelection=0; ImpSelection=0; OriginSelection=0; TemperSelection=0; AstroSelection=0; AffinitySelection=0; // Initiate transition status lastActionWasNext = true; }
public void MenuGoNext(int Option) { lastActionWasNext = true; switch (currentState) { case CreateAPlayerStates.MENU: switch (Option) { case 1: // I chose "New game" currentState = CreateAPlayerStates.MODESELECTION; GameMenuButtons.GameMenu.enabled = false; NewGameMenuButtons.NewGameMenu.enabled = true; break; case 2: // I chose "load game" currentState = CreateAPlayerStates.LOAD; GameMenuButtons.GameMenu.enabled = false; LoadGameMenuButtons.LoadGameMenu.enabled = true; LoadGameMenuButtons.GetLoadNames(); break; } break; case CreateAPlayerStates.MODESELECTION: menuAudio.PlayCreationMenuAudio(); switch (Option) { case 1: // I chose "Guided" currentState = CreateAPlayerStates.PREDEFINEDSELECTION; NewGameMenuButtons.NewGameMenu.enabled = false; CreationGameMenuStaticButtons.CreationGameMenuStatic.enabled = true; PreDefinedSelectionButtons.PreDefinedSelection.enabled = true; Stand.SetActive (true); Player.SetActive (true); break; case 2: // I chose "Custom" currentState = CreateAPlayerStates.HISTORYSELECTION; NewGameMenuButtons.NewGameMenu.enabled = false; CreationGameMenuStaticButtons.CreationGameMenuStatic.enabled = true; HistorySelectionButtons.HistorySelection.enabled = true; Stand.SetActive (true); Player.SetActive (true); break; } break; case CreateAPlayerStates.PREDEFINEDSELECTION: if (!(PreDefinedSelectionButtons.HistoryChoice == 0)) { HistorySelectionNext (Option); historyAllocation.CreateNewPlayer (HellCircleSelection, AllegianceSelection, GenusSelection, SpeciesSelection, JobSelection, ImpSelection, OriginSelection, TemperSelection, AstroSelection, AffinitySelection); currentState = CreateAPlayerStates.STATALLOCATION; PreDefinedSelectionButtons.PreDefinedSelection.enabled = false; StatAllocationButtons.StatAllocationMenu.enabled = true; statAllocation.DisplayStatAllocationModule(); } break; case CreateAPlayerStates.HISTORYSELECTION: HistorySelectionNext (Option); if(HistorySelectionButtons.currentStep==HistorySelectionButtons.PlayerHistoryStep.END){ historyAllocation.CreateNewPlayer (HellCircleSelection, AllegianceSelection, GenusSelection, SpeciesSelection, JobSelection, ImpSelection, OriginSelection, TemperSelection, AstroSelection, AffinitySelection); currentState = CreateAPlayerStates.STATALLOCATION; HistorySelectionButtons.HistorySelection.enabled = false; StatAllocationButtons.StatAllocationMenu.enabled = true; statAllocation.DisplayStatAllocationModule(); } break; case CreateAPlayerStates.STATALLOCATION: if (statAllocation.readyForNext==true) { statAllocation.StoreStatAllocation (); currentState = CreateAPlayerStates.FINALSETUP; StatAllocationButtons.StatAllocationMenu.enabled = false; BackgroundSelectionButtons.BackgroundSelection.enabled=true; } break; case CreateAPlayerStates.FINALSETUP: bool ReadyforNext=BackgroundSelectionButtons.TestDetails(); if (ReadyforNext==true) { BackgroundSelectionButtons.SendDetails(); BackgroundSelectionButtons.BackgroundSelection.enabled=false; CreationGameMenuStaticButtons.CreationGameMenuStatic.enabled = false; SaveGameMenuButtons.SaveGameMenu.enabled=true; SaveGameMenuButtons.GetSaveNames(); currentState = CreateAPlayerStates.SAVE; } break; case CreateAPlayerStates.LOAD: LoadGameMenuButtons.LoadGameMenu.enabled = false; currentState = CreateAPlayerStates.PLAY; SceneManager.LoadScene("Play"); break; case CreateAPlayerStates.SAVE: SaveGameMenuButtons.SaveGameMenu.enabled=false; currentState = CreateAPlayerStates.PLAY; Stand.SetActive (false); Player.SetActive (false); Debug.Log("Before:" + GameInformation.BasePlayer.PlayerFirstName.ToString()); SceneManager.LoadScene("Play"); Debug.Log("After 1:" + GameInformation.BasePlayer.PlayerFirstName.ToString()); break; } }
public void MenuGoBack(int option) { lastActionWasNext = false; switch (currentState) { case CreateAPlayerStates.MENU: Application.Quit (); break; case CreateAPlayerStates.LOAD: currentState = CreateAPlayerStates.MENU; LoadGameMenuButtons.LoadGameMenu.enabled = false; GameMenuButtons.GameMenu.enabled = true; break; case CreateAPlayerStates.MODESELECTION: currentState = CreateAPlayerStates.MENU; NewGameMenuButtons.NewGameMenu.enabled = false; GameMenuButtons.GameMenu.enabled = true; break; case CreateAPlayerStates.HISTORYSELECTION: HistorySelectionBack (); if (HistorySelectionButtons.currentStep==HistorySelectionButtons.PlayerHistoryStep.START) { currentState = CreateAPlayerStates.MENU; CreationGameMenuStaticButtons.CreationGameMenuStatic.enabled = false; HistorySelectionButtons.HistorySelection.enabled = false; GameMenuButtons.GameMenu.enabled = true; Stand.SetActive (false); Player.SetActive (false); menuAudio.PlayGameMenuAudio(); } break; case CreateAPlayerStates.PREDEFINEDSELECTION: currentState = CreateAPlayerStates.MENU; CreationGameMenuStaticButtons.CreationGameMenuStatic.enabled = false; PreDefinedSelectionButtons.PreDefinedSelection.enabled = false; GameMenuButtons.GameMenu.enabled = true; Stand.SetActive (false); Player.SetActive (false); menuAudio.PlayGameMenuAudio(); break; case CreateAPlayerStates.STATALLOCATION: switch (option) { case 1: StatAllocationButtons.StatAllocationMenu.enabled = false; currentState = CreateAPlayerStates.PREDEFINEDSELECTION; statAllocation.didRunOnce = false; PreDefinedSelectionButtons.PreDefinedSelection.enabled = true; break; case 2: StatAllocationButtons.StatAllocationMenu.enabled = false; currentState = CreateAPlayerStates.HISTORYSELECTION; HistorySelectionButtons.currentStep = HistorySelectionButtons.PlayerHistoryStep.AFFINITY; statAllocation.didRunOnce = false; HistorySelectionButtons.HistoryChoice = AffinitySelection; HistorySelectionButtons.HistorySelection.enabled = true; break; } break; case CreateAPlayerStates.FINALSETUP: BackgroundSelectionButtons.BackgroundSelection.enabled=false; StatAllocationButtons.StatAllocationMenu.enabled = true; currentState = CreateAPlayerStates.STATALLOCATION; break; case CreateAPlayerStates.SAVE: SaveGameMenuButtons.SaveGameMenu.enabled=false; BackgroundSelectionButtons.BackgroundSelection.enabled=true; currentState = CreateAPlayerStates.FINALSETUP; break; } }
// Use this for initialization void Start() { currentState = CreateAPlayerStates.SELECTORIGIN; }
// Use this for initialization void Start() { currentState = CreateAPlayerStates.CLASSSELECTION; }
// Use this for initialization void Start() { //Start on first Character Creation Screen currentState = CreateAPlayerStates.CLASSSELECTION; }
// Use this for initialization void Start() { currentState = CreateAPlayerStates.SELECTCLASS; }