Compare commits
2 Commits
a8acea4151
...
1f36b44cfd
Author | SHA1 | Date |
---|---|---|
Syntriax | 1f36b44cfd | |
Syntriax | a4fd3343b1 |
|
@ -21,7 +21,7 @@ namespace Syntriax.Modules.Trigger
|
||||||
{
|
{
|
||||||
int triggerCount = TriggerCount;
|
int triggerCount = TriggerCount;
|
||||||
|
|
||||||
if (triggerCount != previousTriggerCount)
|
if (!IsArrayAndListIdentical(triggerCount))
|
||||||
{
|
{
|
||||||
ColliderList.Clear();
|
ColliderList.Clear();
|
||||||
for (int i = 0; i < triggerCount; i++)
|
for (int i = 0; i < triggerCount; i++)
|
||||||
|
@ -33,5 +33,17 @@ namespace Syntriax.Modules.Trigger
|
||||||
previousTriggerCount = triggerCount;
|
previousTriggerCount = triggerCount;
|
||||||
return triggerCount > 0;
|
return triggerCount > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool IsArrayAndListIdentical(int triggerCount)
|
||||||
|
{
|
||||||
|
if (previousTriggerCount != triggerCount)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
for (int i = 0; i < triggerCount; i++)
|
||||||
|
if (!ColliderList.Contains(nonAllocResults[i]))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue