public void HistorySelectionNext()
    {
        switch (currentStep)
        {
        case PlayerHistoryStep.HELLCIRCLE:
            currentStep = PlayerHistoryStep.ALLEGIANCE;
            //menuGUI.dialogue.UpdateDialogue(true, (string)((ArrayList)RefQuestions[5])[2], (string)((ArrayList)RefQuestions[5])[3], (string)((ArrayList)RefQuestions[5])[4]);
            break;

        case PlayerHistoryStep.ALLEGIANCE:
            currentStep = PlayerHistoryStep.GENUS;
            //menuGUI.dialogue.UpdateDialogue(true, (string)((ArrayList)RefQuestions[6])[2], (string)((ArrayList)RefQuestions[6])[3], (string)((ArrayList)RefQuestions[6])[4]);
            break;

        case PlayerHistoryStep.GENUS:
            currentStep = PlayerHistoryStep.CLASS;
            //menuGUI.dialogue.UpdateDialogue(true, (string)((ArrayList)RefQuestions[7])[2], (string)((ArrayList)RefQuestions[7])[3], (string)((ArrayList)RefQuestions[7])[4]);
            break;

        case PlayerHistoryStep.CLASS:
            currentStep = PlayerHistoryStep.IMP;
            //menuGUI.dialogue.UpdateDialogue(true, (string)((ArrayList)RefQuestions[8])[2], (string)((ArrayList)RefQuestions[8])[3], (string)((ArrayList)RefQuestions[8])[4]);
            break;

        case PlayerHistoryStep.IMP:
            currentStep = PlayerHistoryStep.ORIGIN;
            //menuGUI.dialogue.UpdateDialogue(true, (string)((ArrayList)RefQuestions[9])[2], (string)((ArrayList)RefQuestions[9])[3], (string)((ArrayList)RefQuestions[9])[4]);
            break;

        case PlayerHistoryStep.ORIGIN:
            currentStep = PlayerHistoryStep.TEMPER;
            //menuGUI.dialogue.UpdateDialogue(true, (string)((ArrayList)RefQuestions[10])[2], (string)((ArrayList)RefQuestions[10])[3], (string)((ArrayList)RefQuestions[10])[4]);
            break;

        case PlayerHistoryStep.TEMPER:
            currentStep = PlayerHistoryStep.ASTRO;
            //menuGUI.dialogue.UpdateDialogue(true, (string)((ArrayList)RefQuestions[11])[2], (string)((ArrayList)RefQuestions[11])[3], (string)((ArrayList)RefQuestions[11])[4]);
            break;

        case PlayerHistoryStep.ASTRO:
            currentStep = PlayerHistoryStep.AFFINITY;
            //menuGUI.dialogue.UpdateDialogue(true, (string)((ArrayList)RefQuestions[12])[2], (string)((ArrayList)RefQuestions[12])[3], (string)((ArrayList)RefQuestions[12])[4]);
            break;

        case PlayerHistoryStep.AFFINITY:
            currentStep = PlayerHistoryStep.END;
            break;
        }

        if (!(currentStep == PlayerHistoryStep.END))
        {
            GetHistoryUIButtons();
            HistoryChoice = 0;
        }
    }
    public void HistorySelectionBack()
    {
        switch (currentStep)
        {
        case PlayerHistoryStep.HELLCIRCLE:
            currentStep = PlayerHistoryStep.START;
            break;

        case PlayerHistoryStep.ALLEGIANCE:
            HistoryChoice = historyChoices.HellCircleChoice;
            currentStep   = PlayerHistoryStep.HELLCIRCLE;
            break;

        case PlayerHistoryStep.GENUS:
            HistoryChoice = historyChoices.AllegianceChoice;
            currentStep   = PlayerHistoryStep.ALLEGIANCE;
            break;

        case PlayerHistoryStep.CLASS:
            HistoryChoice = historyChoices.SpeciesChoice;
            currentStep   = PlayerHistoryStep.GENUS;
            break;

        case PlayerHistoryStep.IMP:
            HistoryChoice = historyChoices.JobChoice;
            currentStep   = PlayerHistoryStep.CLASS;
            break;

        case PlayerHistoryStep.ORIGIN:
            HistoryChoice = historyChoices.ImpChoice;
            currentStep   = PlayerHistoryStep.IMP;
            break;

        case PlayerHistoryStep.TEMPER:
            HistoryChoice = historyChoices.OriginChoice;
            currentStep   = PlayerHistoryStep.ORIGIN;
            break;

        case PlayerHistoryStep.ASTRO:
            HistoryChoice = historyChoices.TemperChoice;
            currentStep   = PlayerHistoryStep.TEMPER;
            break;

        case PlayerHistoryStep.AFFINITY:
            HistoryChoice = historyChoices.AstroChoice;
            currentStep   = PlayerHistoryStep.ASTRO;
            break;
        }
        GetHistoryUIButtons();
    }
    void Start()
    {
        // Récupérer les référentiels
        RefHellCircles = dataBaseManager.getArrayData("select * from REF_CustomCharacters where ChoiceStage='HellCircles' order by Id asc", "BlueStarDataWarehouse.db");
        RefAllegiance  = dataBaseManager.getArrayData("select * from REF_CustomCharacters where ChoiceStage='Allegiance' order by Id asc", "BlueStarDataWarehouse.db");
        RefGenus       = dataBaseManager.getArrayData("select * from REF_CustomCharacters where ChoiceStage='Genus' order by Id asc", "BlueStarDataWarehouse.db");
        RefSpecies     = dataBaseManager.getArrayData("select * from REF_CustomCharacters where ChoiceStage='Species' order by Id asc", "BlueStarDataWarehouse.db");
        RefClass       = dataBaseManager.getArrayData("select * from REF_CustomCharacters where ChoiceStage='Class' order by Id asc", "BlueStarDataWarehouse.db");
        RefImp         = dataBaseManager.getArrayData("select * from REF_CustomCharacters where ChoiceStage='Imp' order by Id asc", "BlueStarDataWarehouse.db");
        RefOrigin      = dataBaseManager.getArrayData("select * from REF_CustomCharacters where ChoiceStage='Origin' order by Id asc", "BlueStarDataWarehouse.db");
        RefTemper      = dataBaseManager.getArrayData("select * from REF_CustomCharacters where ChoiceStage='Temper' order by Id asc", "BlueStarDataWarehouse.db");
        RefAstro       = dataBaseManager.getArrayData("select * from REF_CustomCharacters where ChoiceStage='Astro' order by Id asc", "BlueStarDataWarehouse.db");
        RefAffinity    = dataBaseManager.getArrayData("select * from REF_CustomCharacters where ChoiceStage='Affinity' order by Id asc", "BlueStarDataWarehouse.db");
        RefQuestions   = dataBaseManager.getArrayData("select * from REF_Dialogues where Context='CharacterCreation' order by Id asc", "BlueStarDataWarehouse.db");
        RefErrors      = dataBaseManager.getArrayData("select * from REF_Dialogues where Context='Errors' order by Id asc", "BlueStarDataWarehouse.db");


        //Initialiser le cycle
        currentStep = PlayerHistoryStep.HELLCIRCLE;

        //Initialiser les choices à 0
        historyChoices.HellCircleChoice = 0;
        historyChoices.AllegianceChoice = 0;
        historyChoices.GenusChoice      = 0;
        historyChoices.SpeciesChoice    = 0;
        historyChoices.JobChoice        = 0;
        historyChoices.ImpChoice        = 0;
        historyChoices.OriginChoice     = 0;
        historyChoices.TemperChoice     = 0;
        historyChoices.AstroChoice      = 0;
        historyChoices.AffinityChoice   = 0;

        //Connection vers éléments de l'UI
        HistorySelection = GetComponent <Canvas> ();

        for (int i = 0; i < 9; i++)
        {
            Choice [i] = ChoiceDisplay.GetComponentsInChildren <Button> () [i];
        }



        GetHistoryUIButtons();

        HistorySelection.enabled = false;
    }
    void Start()
    {
        currentStep = PlayerHistoryStep.HELLCIRCLE;
        HistorySelection = GetComponent<Canvas> ();
        HistoChoiceDescription = HistorySelection.GetComponentInChildren<RectTransform> ();
        ChoiceDisplay = HistoChoiceDescription.GetComponentInChildren<GridLayoutGroup> ();

        for (int i=0; i<9; i++) {
            Choice [i] = ChoiceDisplay.GetComponentsInChildren<Button> () [i];
        }
        for (int i=0; i<10; i++) {
            HistoryChoiceDisplay [i] = HistorySelection.GetComponentInChildren<Mask> ().GetComponentsInChildren<Text> () [i];
        }
        for (int i=0; i<9; i++) {
            HistoryChoiceImage [i] = HistorySelection.GetComponentInChildren<Mask> ().GetComponentsInChildren<Image> () [i + 1];
        }

        GetHistoryUIButtons ();

        HistorySelection.enabled = false;
    }