예제 #1
0
    public void OnBtnStart()
    {
        GuiTextDebug.debug("UILogin OnPointerClick:");

        LogicManager.Instance.StartLogic();
        Destory();
    }
예제 #2
0
    private void LoadQuestions(string fileName)
    {
        TextAsset txt = Resources.Load("Questions/QuestionList") as TextAsset;

        string[] words;
        string[] lines;
        char[]   delimiterChars1 = { '\n' };
        char[]   delimiterChars2 = { '\t' };
        lines = txt.text.Split(delimiterChars1);
        foreach (string line in lines)
        {
            words = line.Split(delimiterChars2);
            qList.Add(new Questions(int.Parse(words[0]), words[1], words[2], int.Parse(words[3])));
            Debug.Log("load " + words[0] + " " + words[1]);
            GuiTextDebug.debug("load " + words[0] + " " + words[1]);
        }

        /*
         * string[] words;
         * string line;
         * char[] delimiterChars = { '\t' };
         * StreamReader file = new StreamReader(fileName);
         * while ((line = file.ReadLine()) != null)
         * {
         *  words = line.Split(delimiterChars);
         *  qList.Add(new Questions(int.Parse(words[0]), words[1], words[2], int.Parse(words[3])));
         *  Debug.Log("load " + words[0] + " " + words[1]);
         *  GuiTextDebug.debug("load " + words[0] + " " + words[1]);
         * }
         * file.Close();*/
    }
예제 #3
0
    public override void Show(Hashtable hash)
    {
        base.Show(hash);

        GuiTextDebug.debug("UILogin show");
        _BtnStart.interactable = false;

        LogicManager.Instance.StartLoadLogic();

        _BtnStart.interactable = true;
    }
예제 #4
0
        public Questions AskQuestion(AudioSource audioSource)
        {
            Questions currentQuestion = questions.GetNextQuestion();

            if (currentQuestion != null)
            {
                Debug.Log("Question: " + currentQuestion.QText);
                GuiTextDebug.debug("Question: " + currentQuestion.QText);
                audioSource.clip = Resources.Load("Audio/" + currentQuestion.QAudio) as AudioClip;
                audioSource.Play();
            }
            else
            {
                Debug.Log("Failed to get Question.");
            }
            return(currentQuestion);
        }
예제 #5
0
    // Delete all Mouips in on the planet.
    public void PopMouip()
    {
        GuiTextDebug.debug("Suppression de tous les Mouips (" + entitiesList.Count.ToString() + ") de la planète.");

        /*
         * while (entitiesList.Count > 0)
         * {
         *  GameObject tempRef = entitiesList[0].gameObject;
         *  entitiesList.Remove(entitiesList[0]);
         *  Destroy(tempRef);
         * }
         */

        // Nouvelle version pour ne cibler que les Mouips
        for (int i = 0; i < entitiesList.Count; i++)
        {
            EntitiyBehaviour mouipReader = entitiesList[i];
            if (mouipReader.GetComponent <IMouip>() != null)
            {
                entitiesList.Remove(mouipReader);
                Destroy(mouipReader);
            }
        }
    }