Ejemplo n.º 1
0
        void Awake()
        {
            var dropdown = GetComponent <Dropdown>();
            var styles   = VoiceSuite.suites;
            var options  = new List <Dropdown.OptionData>();

            foreach (var style in styles)
            {
                options.Add(new Dropdown.OptionData(style.name));
            }
            dropdown.options = options;

            var selected = Settings.GetString(Settings.VOICE_STYLE, styles[0].name);

            options = dropdown.options;
            for (int i = 0; i < options.Count; i++)
            {
                var option = options[i];
                if (option.text.Equals(selected))
                {
                    dropdown.value = i;
                    break;
                }
            }
            VoiceSuite.LoadBySetting();
            dropdown.onValueChanged.AddListener((int value) => {
                Settings.SetString(Settings.VOICE_STYLE, dropdown.options[value].text);
                VoiceSuite.LoadBySetting();
            });
        }
Ejemplo n.º 2
0
 public static void Load()
 {
     if (loaded)
     {
         return;
     }
     Debug.Log("load packages");
     Repository.shared.LoadPackages();
     Debug.Log("load PackageProgressService");
     PackageProgressService.shared.Load();
     Debug.Log("load IllustrationService");
     IllustrationService.shared.Load();
     Debug.Log("load VoiceSuite");
     VoiceSuite.LoadBySetting();
     Debug.Log("load ok");
     loaded = true;
 }
Ejemplo n.º 3
0
        public void StartPackage(Package package, bool chanllenge = false)
        {
            voiceSuite = VoiceSuite.LoadBySetting();

            questionView.gameObject.SetActive(false);
            // cPackageTitle.SetText("「" + package.name + "」");
            oDialogue.SetActive(false);
            oDialogueMask.SetActive(false);

            characterController.ResetState();

            roundService = new RoundService(package, chanllenge);
            roundService.Start();

            SetProgress(roundService.Current, roundService.Total);
            ShowDialogue(false, false, "");

            coroutineForStart = StartCoroutine(StartQuestion());
        }
Ejemplo n.º 4
0
        public static VoiceSuite LoadBySetting()
        {
            string styleName = Settings.GetVoiceStyle(suites[0].name);

            if (styleName.Equals(currentName))
            {
                return(currentSuite);
            }
            if (currentSuite != null)
            {
                Destroy(currentSuite);
            }
            foreach (var desc in suites)
            {
                if (desc.name.Equals(styleName))
                {
                    currentName  = desc.name;
                    currentSuite = Resources.Load <VoiceSuite>(desc.path);
                    return(currentSuite);
                }
            }
            return(null);
        }