fix for .Net 3.5

pull/150/head
mob-sakai 2021-01-06 17:43:14 +09:00
parent 087dbe99b9
commit 63b36a45b9
1 changed files with 2 additions and 23 deletions

View File

@ -224,17 +224,10 @@ namespace Coffee.UIParticleExtensions
return (int) Mathf.Sign(bPos - aPos);
return (int) Mathf.Sign(GetIndex(self, a) - GetIndex(self, b));
// Material instance ID: match
// if (aMat.GetInstanceID() == bMat.GetInstanceID())
// return 0;
// Transform: ascending
// return TransformCompare(aTransform, bTransform);
});
}
private static int GetIndex(IReadOnlyList<ParticleSystem> list, Object ps)
private static int GetIndex(IList<ParticleSystem> list, Object ps)
{
for (var i = 0; i < list.Count; i++)
{
@ -244,20 +237,6 @@ namespace Coffee.UIParticleExtensions
return 0;
}
// private static int TransformCompare(Transform a, Transform b)
// {
// while (true)
// {
// if (!a && !b) return 0;
// if (!a) return -1;
// if (!b) return 1;
// if (a.parent == b.parent) return a.GetSiblingIndex() - b.GetSiblingIndex();
//
// a = a.parent;
// b = b.parent;
// }
// }
public static long GetMaterialHash(this ParticleSystem self, bool trail)
{
if (!self) return 0;
@ -296,4 +275,4 @@ namespace Coffee.UIParticleExtensions
self.ForEach(action);
}
}
}
}