Content struct enumerators (#11894)

This commit is contained in:
metalgearsloth
2022-11-07 03:33:44 +11:00
committed by GitHub
parent 59349c37a0
commit bae7b8d0d8
4 changed files with 12 additions and 5 deletions

View File

@@ -18,7 +18,9 @@ public sealed class RevenantOverloadedLightsSystem : SharedRevenantOverloadedLig
{
base.Update(frameTime);
foreach (var (comp, light) in EntityQuery<RevenantOverloadedLightsComponent, PointLightComponent>())
var enumerator = EntityQueryEnumerator<RevenantOverloadedLightsComponent, PointLightComponent>();
while (enumerator.MoveNext(out var comp, out var light))
{
//this looks cool :HECK:
light.Energy = 2f * Math.Abs((float) Math.Sin(0.25 * Math.PI * comp.Accumulator));