Exemple #1
0
    public void Choised(int _num)
    {
        SendChoisedText(_num);

        //選択SEここ!!!
        AudioClip selectSE = Resources.Load <AudioClip>("voice/SelectSE");

        speaker.PlayOneShot(selectSE);

        if (!ctd.GetIsJump())
        {
            UpdateTexts(false);
            return;
        }

        string extension = MyFunctions.GetExtension(ctd.GetJump(_num));

        if (extension == "csv")
        {
            csvFileName = ctd.GetJump(_num);
            soundCount  = 0;
            ExcelData ed = new ExcelData(Application.dataPath + "/akita/" + csvFileName, true);
            ctd = new CharaTextData(ed);
            UpdateTexts(true);
        }
        else /*if (extension == "unity")*/
        {
            JumpNextStage(_num);
        }
    }
Exemple #2
0
    void Start()
    {
        csvFileName = "text_data/Staff.csv";
        soundCount  = 0;

        ExcelData ed = new ExcelData(Application.dataPath + "/akita/" + csvFileName, true);

        textBoxs    = new Queue <GameObject>();
        choiseBoxes = new GameObject[maxChoiseCount];
        ctd         = new CharaTextData(ed);
        if (ctd.IsInvalid)
        {
            return;
        }

        textBoxLInitPos         = new Vector3(-12, 12, 10);
        textBoxRInitPos         = new Vector3(+12, 12, 10);
        choiseBoxInitPosCenter  = new Vector3(0, -10, 10);
        choiseBoxInitPosSide    = new Vector3[2];
        choiseBoxInitPosSide[0] = new Vector3(-7, -9, 10);
        choiseBoxInitPosSide[1] = new Vector3(+7, -9, 10);

        speaker = gameObject.AddComponent <AudioSource>();

        UpdateTexts(true);
    }