Exemple #1
0
    private void ChangeRole(int id)
    {
        _isShowLive2d = true;
        _live2dGraphic.Show();
        var live2dName = id.ToString();

        if (_extendCacheVo != null && _extendCacheVo.needDownload)
        {
            var curStep = GuideManager.GetRemoteGuideStep(GuideTypePB.MainGuide);
            if (curStep >= GuideConst.MainLineStep_OnClick_FavorabilityShowMainViewBtn)
            {
                //老号,要读取默认的!
                _live2dGraphic.Hide();

                _live2dGraphic.LoadAnimationById(GlobalData.PlayerModel.PlayerVo.Apparel[0].ToString());
            }
            else
            {
                _live2dGraphic.LoadAnimationById(live2dName);
            }
        }
        else
        {
            //_cacheVo = CacheManager.CheckExtendCache();
            _live2dGraphic.LoadAnimationById(live2dName);
        }

//        Debug.LogError("load!");

        L2DModel model = _live2dGraphic.GetMainLive2DView.Model;

        model.StartMotion(L2DConst.MOTION_GROUP_IDLE, 0, L2DConst.PRIORITY_IDLE, true);
        model.SetExpression(model.ExpressionList[2]);
        model.StartEyeBlink();

        SetLive2dClickSize();

        SdkHelper.PushAgent.PushCreate30DaysNotice();
    }