Exemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        WriteANewStory();
        resultPanel.SetActive(false);

        storyPart = STORYPART.PART_0;

        NewStory(storyPart);
    }
Exemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        GenerateNewStory();
        resultPanel.SetActive(false);

        storyPart = STORYPART.PART_0;

        DisplayNewStoryPartUI(storyPart);
    }
Exemplo n.º 3
0
    /**
     * Fill Me In - Craig David
     */
    private void FillMeIn(STORYPART _storyPart)
    {
        switch (_storyPart)
        {
        case STORYPART.PART_0:
            //textBoxList[0].GetComponent<Text>().text = beginSentence;
            sentencePanel.GetComponentInChildren <Text>().text = beginSentence;
            break;

        case STORYPART.PART_1:
            sentencePanel.GetComponentsInChildren <Text>()[0].text = "Le";
            break;

        case STORYPART.PART_2:
            sentencePanel.GetComponentInChildren <Text>().text = thenSentence;
            break;

        case STORYPART.PART_3:
            sentencePanel.GetComponentsInChildren <Text>()[1].text = "le " + subjectChoosed;
            sentencePanel.GetComponentsInChildren <Text>()[2].text = "en";
            sentencePanel.GetComponentsInChildren <Text>()[4].text = "son";
            break;

        case STORYPART.PART_4:
            sentencePanel.GetComponentInChildren <Text>().text = withCourageSentence;
            break;

        case STORYPART.PART_5:
            sentencePanel.GetComponentsInChildren <Text>()[2].text = "pour";
            sentencePanel.GetComponentsInChildren <Text>()[3].text = infVerbChoosed;
            sentencePanel.GetComponentsInChildren <Text>()[4].text = "le " + subjectChoosed + " !";
            break;

        case STORYPART.PART_6:
            sentencePanel.GetComponentInChildren <Text>().text = efficacitySentence;
            break;

        case STORYPART.PART_7:
            sentencePanel.GetComponentsInChildren <Text>()[0].text = "d'" + complement2Choosed;
            sentencePanel.GetComponentsInChildren <Text>()[1].text = "face au";
            sentencePanel.GetComponentsInChildren <Text>()[2].text = bodypartChoosed;
            sentencePanel.GetComponentsInChildren <Text>()[3].text = "du";
            sentencePanel.GetComponentsInChildren <Text>()[4].text = subjectChoosed;
            break;

        case STORYPART.PART_8:
            sentencePanel.GetComponentInChildren <Text>().text = rememberSentence;
            break;

        case STORYPART.PART_9:
            sentencePanel.GetComponentsInChildren <Text>()[0].text = "Le " + subjectChoosed;
            sentencePanel.GetComponentsInChildren <Text>()[1].text = "peut causer maints troubles,";
            break;

        case STORYPART.PART_10:
            sentencePanel.GetComponentsInChildren <Text>()[0].text = "mais agit";
            sentencePanel.GetComponentsInChildren <Text>()[1].text = adjectiveChoosed;
            sentencePanel.GetComponentsInChildren <Text>()[2].text = "et sans peur,";
            break;

        case STORYPART.PART_11:
            sentencePanel.GetComponentsInChildren <Text>()[0].text = "et " + complementChoosed;
            sentencePanel.GetComponentsInChildren <Text>()[1].text = "te remerciera !";
            break;
        }
    }
Exemplo n.º 4
0
    /**
     * Fast Display - Mwuana
     */
    private void FastDisplay(STORYPART _storyPart)
    {
        textBoxList.Clear();
        while (sentencePanel.transform.childCount != 0)
        {
            ClearSkies();
        }
        GameObject instantiatedObject;

        switch (_storyPart)
        {
        case STORYPART.PART_0:
            Instantiate(wordText, sentencePanel.transform);
            break;

        case STORYPART.PART_1:
            Instantiate(wordText, sentencePanel.transform);
            for (int i = 0; i < 4; i++)
            {
                instantiatedObject = Instantiate(wordText, sentencePanel.transform);
                textBoxList.Add(instantiatedObject);
            }
            break;

        case STORYPART.PART_2:
            Instantiate(wordText, sentencePanel.transform);
            break;

        case STORYPART.PART_3:
            instantiatedObject = Instantiate(wordText, sentencePanel.transform);
            textBoxList.Add(instantiatedObject);
            for (int i = 0; i < 2; i++)
            {
                Instantiate(wordText, sentencePanel.transform);
            }
            instantiatedObject = Instantiate(wordText, sentencePanel.transform);
            textBoxList.Add(instantiatedObject);
            Instantiate(wordText, sentencePanel.transform);
            for (int i = 0; i < 2; i++)
            {
                instantiatedObject = Instantiate(wordText, sentencePanel.transform);
                textBoxList.Add(instantiatedObject);
            }
            break;

        case STORYPART.PART_4:
            Instantiate(wordText, sentencePanel.transform);
            break;

        case STORYPART.PART_5:
            for (int i = 0; i < 2; i++)
            {
                instantiatedObject = Instantiate(wordText, sentencePanel.transform);
                textBoxList.Add(instantiatedObject);
            }
            for (int i = 0; i < 3; i++)
            {
                Instantiate(wordText, sentencePanel.transform);
            }
            break;

        case STORYPART.PART_6:
            Instantiate(wordText, sentencePanel.transform);
            break;

        case STORYPART.PART_7:
            for (int i = 0; i < 5; i++)
            {
                Instantiate(wordText, sentencePanel.transform);
            }
            break;

        case STORYPART.PART_8:
            Instantiate(wordText, sentencePanel.transform);
            break;

        case STORYPART.PART_9:
            for (int i = 0; i < 2; i++)
            {
                Instantiate(wordText, sentencePanel.transform);
            }
            break;

        case STORYPART.PART_10:
            for (int i = 0; i < 3; i++)
            {
                Instantiate(wordText, sentencePanel.transform);
            }
            break;

        case STORYPART.PART_11:
            for (int i = 0; i < 2; i++)
            {
                Instantiate(wordText, sentencePanel.transform);
            }
            break;
        }
    }
Exemplo n.º 5
0
    /**
     * Affiche pour une nouvelle étape de l'histoire, les cases vides de mots à remplir, et place les mots déjà préfaits
     * New Story - Sixty Seconds
     */
    private void NewStory(STORYPART _storyPart)
    {
        FastDisplay(_storyPart);
        FillMeIn(_storyPart);
        boxIndex = 0;

        //Active ou desactive les boutons de choix
        switch (_storyPart)
        {
        case STORYPART.PART_0:
            Disabled();
            nextButton.SetActive(true);
            break;

        case STORYPART.PART_1:
            Enabler();
            break;

        case STORYPART.PART_2:
            Disabled();
            nextButton.SetActive(true);
            break;

        case STORYPART.PART_3:
            Enabler();
            break;

        case STORYPART.PART_4:
            Disabled();
            nextButton.SetActive(true);
            break;

        case STORYPART.PART_5:
            Enabler();
            break;

        case STORYPART.PART_6:
            Disabled();
            nextButton.SetActive(true);
            break;

        case STORYPART.PART_7:
            Disabled();
            nextButton.SetActive(true);
            break;

        case STORYPART.PART_8:
            Disabled();
            nextButton.SetActive(true);
            break;

        case STORYPART.PART_9:
            Disabled();
            nextButton.SetActive(true);
            break;

        case STORYPART.PART_10:
            Disabled();
            nextButton.SetActive(true);
            break;

        case STORYPART.PART_11:
            Disabled();
            nextButton.SetActive(true);
            break;
        }

        UpdateBirthday();
    }
Exemplo n.º 6
0
    /**
     * Fonction lancée par le bouton NextButton, et permet de passer à l'étape suivante de l'histoire
     * Next Step - Sian
     */
    public void NextStep()
    {
        switch (storyPart)
        {
        case STORYPART.PART_0:
            storyPart = STORYPART.PART_1;
            break;

        case STORYPART.PART_1:
            storyPart = STORYPART.PART_2;
            break;

        case STORYPART.PART_2:
            storyPart = STORYPART.PART_3;
            break;

        case STORYPART.PART_3:
            storyPart = STORYPART.PART_4;
            break;

        case STORYPART.PART_4:
            storyPart = STORYPART.PART_5;
            break;

        case STORYPART.PART_5:
            storyPart = STORYPART.PART_6;
            break;

        case STORYPART.PART_6:
            storyPart = STORYPART.PART_7;
            break;

        case STORYPART.PART_7:
            storyPart = STORYPART.PART_8;
            break;

        case STORYPART.PART_8:
            storyPart = STORYPART.PART_9;
            break;

        case STORYPART.PART_9:
            storyPart = STORYPART.PART_10;
            break;

        case STORYPART.PART_10:
            storyPart = STORYPART.PART_11;
            break;

        case STORYPART.PART_11:
            if (resultPanel.activeInHierarchy == false)
            {
                resultPanel.SetActive(true);
                sentencePanel.SetActive(false);
                ShowMustGoOn();
            }
            else
            {
                resultPanel.SetActive(false);
                sentencePanel.SetActive(true);
                storyPart       = STORYPART.PART_0;
                currentWordType = WORDTYPE.SUBJECT;
                tryNumber++;
                tryNumberText.text = tryNumber.ToString();
                hero1WordPlayerList.Clear();
                hero2WordPlayerList.Clear();
                hero3WordPlayerList.Clear();
            }
            break;
        }

        nextButton.SetActive(false);
        NewStory(storyPart);
    }
Exemplo n.º 7
0
    /**
     * Affiche pour une nouvelle étape de l'histoire, les cases vides de mots à remplir, et place les mots déjà préfaits
     */
    private void DisplayNewStoryPartUI(STORYPART _storyPart)
    {
        DisplaySlots(_storyPart);
        FillPremadeSentence(_storyPart);
        boxIndex = 0;

        //Active ou desactive les boutons de choix
        switch (_storyPart)
        {
        case STORYPART.PART_0:
            DisableChoiceButtons();
            nextButton.SetActive(true);
            break;

        case STORYPART.PART_1:
            EnableChoiceButtons();
            break;

        case STORYPART.PART_2:
            DisableChoiceButtons();
            nextButton.SetActive(true);
            break;

        case STORYPART.PART_3:
            EnableChoiceButtons();
            break;

        case STORYPART.PART_4:
            DisableChoiceButtons();
            nextButton.SetActive(true);
            break;

        case STORYPART.PART_5:
            EnableChoiceButtons();
            break;

        case STORYPART.PART_6:
            DisableChoiceButtons();
            nextButton.SetActive(true);
            break;

        case STORYPART.PART_7:
            DisableChoiceButtons();
            nextButton.SetActive(true);
            break;

        case STORYPART.PART_8:
            DisableChoiceButtons();
            nextButton.SetActive(true);
            break;

        case STORYPART.PART_9:
            DisableChoiceButtons();
            nextButton.SetActive(true);
            break;

        case STORYPART.PART_10:
            DisableChoiceButtons();
            nextButton.SetActive(true);
            break;

        case STORYPART.PART_11:
            DisableChoiceButtons();
            nextButton.SetActive(true);
            break;
        }

        UpdateButtonText();
    }