update
This commit is contained in:
@@ -48,6 +48,11 @@ namespace BITKit.Animations
|
||||
layerInfos.Add(new());
|
||||
}
|
||||
}
|
||||
|
||||
if (index > layerInfos.Count - 1)
|
||||
{
|
||||
throw new Exception("Index out of range");
|
||||
}
|
||||
return layerInfos[index];
|
||||
}
|
||||
}
|
||||
@@ -107,10 +112,9 @@ namespace BITKit.Animations
|
||||
|
||||
private void Update()
|
||||
{
|
||||
int index = 0;
|
||||
foreach (var x in layerInfos)
|
||||
for (var i = 0; i < animator.layerCount; i++)
|
||||
{
|
||||
x.currentState = animator.GetCurrentAnimatorStateInfo(index++);
|
||||
this[i].currentState = animator.GetCurrentAnimatorStateInfo(i);
|
||||
}
|
||||
isMatchingTarget = animator.isMatchingTarget;
|
||||
}
|
||||
|
Reference in New Issue
Block a user