mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
NetworkAnimator uses parameters array instead of 6 param values
This commit is contained in:
parent
3fe93cbe44
commit
745233ca99
@ -46,12 +46,7 @@ public bool GetParameterAutoSend(int index)
|
|||||||
float m_SendTimer;
|
float m_SendTimer;
|
||||||
|
|
||||||
// tracking - these should probably move to a Preview component.
|
// tracking - these should probably move to a Preview component.
|
||||||
public string param0;
|
public string[] parameters = new string[6];
|
||||||
public string param1;
|
|
||||||
public string param2;
|
|
||||||
public string param3;
|
|
||||||
public string param4;
|
|
||||||
public string param5;
|
|
||||||
|
|
||||||
bool sendMessagesAllowed
|
bool sendMessagesAllowed
|
||||||
{
|
{
|
||||||
@ -176,24 +171,12 @@ void SendAnimationParametersMessage(byte[] parameters)
|
|||||||
|
|
||||||
void SetSendTrackingParam(string p, int i)
|
void SetSendTrackingParam(string p, int i)
|
||||||
{
|
{
|
||||||
p = "Sent Param: " + p;
|
parameters[i] = "Sent Param: " + p;
|
||||||
if (i == 0) param0 = p;
|
|
||||||
if (i == 1) param1 = p;
|
|
||||||
if (i == 2) param2 = p;
|
|
||||||
if (i == 3) param3 = p;
|
|
||||||
if (i == 4) param4 = p;
|
|
||||||
if (i == 5) param5 = p;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetRecvTrackingParam(string p, int i)
|
void SetRecvTrackingParam(string p, int i)
|
||||||
{
|
{
|
||||||
p = "Recv Param: " + p;
|
parameters[i] = "Recv Param: " + p;
|
||||||
if (i == 0) param0 = p;
|
|
||||||
if (i == 1) param1 = p;
|
|
||||||
if (i == 2) param2 = p;
|
|
||||||
if (i == 3) param3 = p;
|
|
||||||
if (i == 4) param4 = p;
|
|
||||||
if (i == 5) param5 = p;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void HandleAnimMsg(int stateHash, float normalizedTime, NetworkReader reader)
|
internal void HandleAnimMsg(int stateHash, float normalizedTime, NetworkReader reader)
|
||||||
|
@ -83,11 +83,13 @@ void DrawControls()
|
|||||||
if (Application.isPlaying)
|
if (Application.isPlaying)
|
||||||
{
|
{
|
||||||
EditorGUILayout.Separator();
|
EditorGUILayout.Separator();
|
||||||
if (m_AnimSync.param0 != "") EditorGUILayout.LabelField("Param 0", m_AnimSync.param0);
|
for (int i = 0; i < m_AnimSync.parameters.Length; ++i)
|
||||||
if (m_AnimSync.param1 != "") EditorGUILayout.LabelField("Param 1", m_AnimSync.param1);
|
{
|
||||||
if (m_AnimSync.param2 != "") EditorGUILayout.LabelField("Param 2", m_AnimSync.param2);
|
if (!string.IsNullOrEmpty(m_AnimSync.parameters[i]))
|
||||||
if (m_AnimSync.param3 != "") EditorGUILayout.LabelField("Param 3", m_AnimSync.param3);
|
{
|
||||||
if (m_AnimSync.param4 != "") EditorGUILayout.LabelField("Param 4", m_AnimSync.param4);
|
EditorGUILayout.LabelField("Param " + i, m_AnimSync.parameters[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user