mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[unity] Formatting (#889)
This commit is contained in:
parent
5b54167005
commit
06c2482dcd
@ -132,10 +132,10 @@ namespace Spine.Unity {
|
||||
bool hasNext = nextStateInfo.fullPathHash != 0;
|
||||
AnimatorClipInfo[] clipInfo = animator.GetCurrentAnimatorClipInfo(layer);
|
||||
AnimatorClipInfo[] nextClipInfo = animator.GetNextAnimatorClipInfo(layer);
|
||||
// UNITY 4
|
||||
// bool hasNext = nextStateInfo.nameHash != 0;
|
||||
// var clipInfo = animator.GetCurrentAnimationClipState(i);
|
||||
// var nextClipInfo = animator.GetNextAnimationClipState(i);
|
||||
//UNITY 4
|
||||
//bool hasNext = nextStateInfo.nameHash != 0;
|
||||
//var clipInfo = animator.GetCurrentAnimationClipState(i);
|
||||
//var nextClipInfo = animator.GetNextAnimationClipState(i);
|
||||
|
||||
MixMode mode = layerMixModes[layer];
|
||||
if (mode == MixMode.AlwaysMix) {
|
||||
@ -201,19 +201,17 @@ namespace Spine.Unity {
|
||||
}
|
||||
|
||||
static float AnimationTime (float normalizedTime, float clipLength, bool loop, bool reversed) {
|
||||
if(reversed){
|
||||
normalizedTime = (1-normalizedTime+(int)normalizedTime) + (int)normalizedTime;
|
||||
}
|
||||
if (reversed)
|
||||
normalizedTime = (1-normalizedTime + (int)normalizedTime) + (int)normalizedTime;
|
||||
float time = normalizedTime * clipLength;
|
||||
if (loop) return time;
|
||||
const float EndSnapEpsilon = 1f/30f; // Workaround for end-duration keys not being applied.
|
||||
return (clipLength - time < EndSnapEpsilon) ? clipLength : time; // return a time snapped to clipLength;
|
||||
}
|
||||
|
||||
static float AnimationTime(float normalizedTime, float clipLength, bool reversed) {
|
||||
if(reversed){
|
||||
normalizedTime = (1-normalizedTime+(int)normalizedTime) + (int)normalizedTime;
|
||||
}
|
||||
static float AnimationTime (float normalizedTime, float clipLength, bool reversed) {
|
||||
if (reversed)
|
||||
normalizedTime = (1-normalizedTime + (int)normalizedTime) + (int)normalizedTime;
|
||||
|
||||
return normalizedTime * clipLength;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user