Exemplo n.º 1
0
    public void SetData(int background, int cloth)
    {
        _live2DGraphic.AddDonotUnloadIds(cloth.ToString());
        _live2DGraphic.LoadAnimationById(cloth.ToString());

        BGTexture(GlobalData.FavorabilityMainModel.GetBgImageName(background));
    }
Exemplo n.º 2
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();
    }
Exemplo n.º 3
0
	public void SetData(MusicInfoPB todaySongInfo,MusicInfoPB tomorrowSongInfo)
	{				
      _bgImage.texture = ResourceManager.Load<Texture>("TrainingRoom/background/"+todaySongInfo.MusicId);

      _songContent.GetRawImage("SongBg/SongCDBg/SongImage").texture = ResourceManager.Load<Texture>("TrainingRoom/cover1/"+todaySongInfo.MusicId);
      
      _songContent.GetText("SongBg/TomorrowSongName").text = "明日应援曲目:" +tomorrowSongInfo.MusicName;

      int id = int.Parse(todaySongInfo.MusicId.ToString()[0].ToString());
      if (id < 5)
      {
	      string[] live2dIds = {"12101", "12201", "12301", "12401"};
	      _live2dGraphic.LoadAnimationById(live2dIds[id-1]);
      }
      else
      {
	      _live2dGraphic.Hide();
      }
	}
Exemplo n.º 4
0
    public void SetData(UserFavorabilityVo vo)
    {
        _userFavorabilityVo = vo;
        _npcId      = (int)vo.Player;
        _level.text = vo.Level.ToString();
        var curNeedExp     = GlobalData.FavorabilityMainModel.GetCurrentLevelExpNeed(vo.Level);
        var curShowNeedExp = GlobalData.FavorabilityMainModel.GetCurrentLevelRule(vo.Level).Exp;

        if (vo.Level == _maxLevel)
        {
            _progressText.text     = GlobalData.FavorabilityMainModel.GetLastExp().ToString();
            _progressBar.DeltaX    = 0;
            _progressBar.ProgressY = 0;
        }
        else
        {
            _progressText.text     = vo.ShowExp + "/" + curShowNeedExp;
            _progressBar.DeltaX    = 0;
            _progressBar.ProgressY = (int)((float)vo.Exp / curNeedExp * 100);
        }
        _live2DGraphic.LoadAnimationById(vo.Apparel[0].ToString());
        BGTexture(GlobalData.FavorabilityMainModel.GetBgImageName(vo.Apparel[1]));
    }
Exemplo n.º 5
0
 private void PresonBGTexture(string image)
 {
     _live2DGraphic.LoadAnimationById(image);
 }