refactor: refactor

mob-sakai 2024-06-18 17:11:14 +09:00
parent 70271ae5e9
commit 1b8f0aac4a
1 changed files with 2 additions and 4 deletions

View File

@ -58,9 +58,8 @@ namespace Coffee.UIExtensions
for (var i = 0; i < s_ActiveParticles.Count; i++)
{
var uip = s_ActiveParticles[i];
if (!uip || !uip.canvas || !uip.isPrimary || s_UpdatedGroupIds.Contains(uip.groupId)) continue;
if (!uip || !uip.canvas || !uip.isPrimary || !s_UpdatedGroupIds.Add(uip.groupId)) continue;
s_UpdatedGroupIds.Add(uip.groupId);
uip.UpdateTransformScale();
uip.UpdateRenderers();
}
@ -77,9 +76,8 @@ namespace Coffee.UIExtensions
{
uip.UpdateRenderers();
}
else if (!s_UpdatedGroupIds.Contains(uip.groupId))
else if (s_UpdatedGroupIds.Add(uip.groupId))
{
s_UpdatedGroupIds.Add(uip.groupId);
uip.UpdateRenderers();
}
}