コード例 #1
0
        public void SetData(TelephoneVo vo, bool showAnimation)
        {
            OpenAnimation(showAnimation);

            _telephoneVo = vo;

            _bgBlurEffect.StartRecord(
                ResourceManager.Load <Texture>(AssetLoader.GetStoryBgImage(_telephoneVo.bgImageId), ModuleName), tex =>
            {
                _bgImage.texture = tex;
            });
            _roleNameText.text = vo.GetRoleName();

            _headImage.sprite = AssetManager.Instance.GetSpriteAtlas("UIAtlas_Story_Role" + (int)vo.Role);

            _currentIndex = 0;
            IsWait        = false;
            _dialogFrame.gameObject.Show();

            if (_continueAutoPlay)
            {
                OnAutoPlay(_continueAutoPlay);
            }
            else
            {
                NextStep(null);
            }
        }
コード例 #2
0
        public void LoadTelphoneById(string id, Action <TelephoneVo> onComplete)
        {
            string text = new AssetLoader().LoadTextSync(AssetLoader.GetStoryTelphoneDataPath(id));

            text = text.Replace("{$player}", GlobalData.PlayerModel.PlayerVo.UserName);
            TelephoneVo vo = JsonConvert.DeserializeObject <TelephoneVo>(text);

            onComplete(vo);
        }