mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
NetworkAnimator: OnSerialize syntax
This commit is contained in:
parent
275d5ad797
commit
7c87da9bc7
@ -375,18 +375,11 @@ public override void OnSerialize(NetworkWriter writer, bool initialState)
|
||||
{
|
||||
for (int i = 0; i < animator.layerCount; i++)
|
||||
{
|
||||
if (animator.IsInTransition(i))
|
||||
{
|
||||
AnimatorStateInfo st = animator.GetNextAnimatorStateInfo(i);
|
||||
writer.WriteInt(st.fullPathHash);
|
||||
writer.WriteFloat(st.normalizedTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
AnimatorStateInfo st = animator.GetCurrentAnimatorStateInfo(i);
|
||||
writer.WriteInt(st.fullPathHash);
|
||||
writer.WriteFloat(st.normalizedTime);
|
||||
}
|
||||
AnimatorStateInfo st = animator.IsInTransition(i)
|
||||
? animator.GetNextAnimatorStateInfo(i)
|
||||
: animator.GetCurrentAnimatorStateInfo(i);
|
||||
writer.WriteInt(st.fullPathHash);
|
||||
writer.WriteFloat(st.normalizedTime);
|
||||
writer.WriteFloat(animator.GetLayerWeight(i));
|
||||
}
|
||||
WriteParameters(writer, initialState);
|
||||
|
Loading…
Reference in New Issue
Block a user