public override void StartTask()
        {
            base.StartTask();
            this.m_UIManager = CUIManager.GetInstance();

            var soundVolume = (float)CTaskUtil.Get(CTaskUtil.GAME_SOUND_VOLUME);

            this.m_UIManager.SetSoundVolume(soundVolume);
        }
示例#2
0
        protected virtual void Start()
        {
            this.root        = CRootTask.GetInstance();
            this.m_UIManager = CUIManager.GetInstance();
            this.m_SongData  = CTaskUtil.REFERENCES [CTaskUtil.SELECTED_SONG] as CSongData;
            this.m_AudioName = m_SongData.songName;
            var currentTask = this.root.GetCurrentTask();

            if (string.IsNullOrEmpty(this.m_AudioName) == false)
            {
                StartCoroutine(LoadAssetsAsyn(this.m_AudioName, () => {
                    this.StartGame();
                }, () => {
                    this.EndGame();
                    throw new Exception("ERROR: Can not load assets.");
                }));
            }
        }