refactor: refactor

pull/318/head
mob-sakai 2024-06-18 17:11:14 +09:00
parent accd3f8410
commit 5a1e65ec56
1 changed files with 2 additions and 4 deletions

View File

@ -57,9 +57,8 @@ namespace Coffee.UIExtensions
for (var i = 0; i < s_ActiveParticles.Count; i++) for (var i = 0; i < s_ActiveParticles.Count; i++)
{ {
var uip = s_ActiveParticles[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.UpdateTransformScale();
uip.UpdateRenderers(); uip.UpdateRenderers();
} }
@ -76,9 +75,8 @@ namespace Coffee.UIExtensions
{ {
uip.UpdateRenderers(); uip.UpdateRenderers();
} }
else if (!s_UpdatedGroupIds.Contains(uip.groupId)) else if (s_UpdatedGroupIds.Add(uip.groupId))
{ {
s_UpdatedGroupIds.Add(uip.groupId);
uip.UpdateRenderers(); uip.UpdateRenderers();
} }
} }