private void WriteNetworkAnimation(IUserCmd cmd, PlayerEntity playerEntity) { try { SingletonManager.Get <DurationHelp>().ProfileStart(CustomProfilerStep.StateWriteAnimation); // 更新动画播放进度,按需写入数据 AnimatorChange(NetworkAnimatorUtil.GetAnimatorLayers(playerEntity.firstPersonAnimator.UnityAnimator, playerEntity.fpAnimStatus.AnimatorLayers, _fsmOutputs.AnimatorP1ChangedTrigger()), playerEntity.fpAnimStatus, cmd); AnimatorChange(NetworkAnimatorUtil.GetAnimatorLayers(playerEntity.thirdPersonAnimator.UnityAnimator, playerEntity.networkAnimator.AnimatorLayers, _fsmOutputs.AnimatorP3ChangedTrigger()), playerEntity.networkAnimator, cmd); } finally { SingletonManager.Get <DurationHelp>().ProfileEnd(CustomProfilerStep.StateWriteAnimation); } }
private void WriteNetworkAnimation(IUserCmd cmd, PlayerEntity playerEntity) { try { SingletonManager.Get <DurationHelp>().ProfileStart(CustomProfilerStep.StateWriteAnimation); NetworkAnimatorUtil.GetAnimatorLayers(playerEntity.firstPersonAnimator.UnityAnimator, playerEntity.fpAnimStatus.AnimatorLayers); AnimatorChange(playerEntity.fpAnimStatus, cmd); // 流量优化用 // playerEntity.fpAnimStatus.ConvertStructureDataToCompressData(); NetworkAnimatorUtil.GetAnimatorLayers(playerEntity.thirdPersonAnimator.UnityAnimator, playerEntity.networkAnimator.AnimatorLayers); AnimatorChange(playerEntity.networkAnimator, cmd); // 流量优化用 // playerEntity.networkAnimator.ConvertStructureDataToCompressData(); } finally { SingletonManager.Get <DurationHelp>().ProfileEnd(CustomProfilerStep.StateWriteAnimation); } }