public static void Update() { for (int i = 0; i < MoonlordDeathDrama._pieces.Count; i++) { MoonlordDeathDrama.MoonlordPiece item = MoonlordDeathDrama._pieces[i]; item.Update(); if (item.Dead) { MoonlordDeathDrama._pieces.Remove(item); i--; } } for (int j = 0; j < MoonlordDeathDrama._explosions.Count; j++) { MoonlordDeathDrama.MoonlordExplosion moonlordExplosion = MoonlordDeathDrama._explosions[j]; moonlordExplosion.Update(); if (moonlordExplosion.Dead) { MoonlordDeathDrama._explosions.Remove(moonlordExplosion); j--; } } bool flag = false; int num = 0; while (num < MoonlordDeathDrama._lightSources.Count) { if (Main.player[Main.myPlayer].Distance(MoonlordDeathDrama._lightSources[num]) >= 2000f) { num++; } else { flag = true; break; } } MoonlordDeathDrama._lightSources.Clear(); if (!flag) { MoonlordDeathDrama.requestedLight = 0f; } if (MoonlordDeathDrama.requestedLight != MoonlordDeathDrama.whitening) { if (Math.Abs(MoonlordDeathDrama.requestedLight - MoonlordDeathDrama.whitening) >= 0.02f) { MoonlordDeathDrama.whitening = MoonlordDeathDrama.whitening + (float)Math.Sign(MoonlordDeathDrama.requestedLight - MoonlordDeathDrama.whitening) * 0.02f; } else { MoonlordDeathDrama.whitening = MoonlordDeathDrama.requestedLight; } } MoonlordDeathDrama.requestedLight = 0f; }
public static void Update() { for (int index = 0; index < MoonlordDeathDrama._pieces.Count; ++index) { MoonlordDeathDrama.MoonlordPiece piece = MoonlordDeathDrama._pieces[index]; piece.Update(); if (piece.Dead) { MoonlordDeathDrama._pieces.Remove(piece); --index; } } for (int index = 0; index < MoonlordDeathDrama._explosions.Count; ++index) { MoonlordDeathDrama.MoonlordExplosion explosion = MoonlordDeathDrama._explosions[index]; explosion.Update(); if (explosion.Dead) { MoonlordDeathDrama._explosions.Remove(explosion); --index; } } bool flag = false; for (int index = 0; index < MoonlordDeathDrama._lightSources.Count; ++index) { if ((double)Main.player[Main.myPlayer].Distance(MoonlordDeathDrama._lightSources[index]) < 2000.0) { flag = true; break; } } MoonlordDeathDrama._lightSources.Clear(); if (!flag) { MoonlordDeathDrama.requestedLight = 0.0f; } if ((double)MoonlordDeathDrama.requestedLight != (double)MoonlordDeathDrama.whitening) { if ((double)Math.Abs(MoonlordDeathDrama.requestedLight - MoonlordDeathDrama.whitening) < 0.0199999995529652) { MoonlordDeathDrama.whitening = MoonlordDeathDrama.requestedLight; } else { MoonlordDeathDrama.whitening += (float)Math.Sign(MoonlordDeathDrama.requestedLight - MoonlordDeathDrama.whitening) * 0.02f; } } MoonlordDeathDrama.requestedLight = 0.0f; }
// Token: 0x06001267 RID: 4711 RVA: 0x004173E4 File Offset: 0x004155E4 public static void Update() { for (int i = 0; i < MoonlordDeathDrama._pieces.Count; i++) { MoonlordDeathDrama.MoonlordPiece moonlordPiece = MoonlordDeathDrama._pieces[i]; moonlordPiece.Update(); if (moonlordPiece.Dead) { MoonlordDeathDrama._pieces.Remove(moonlordPiece); i--; } } for (int j = 0; j < MoonlordDeathDrama._explosions.Count; j++) { MoonlordDeathDrama.MoonlordExplosion moonlordExplosion = MoonlordDeathDrama._explosions[j]; moonlordExplosion.Update(); if (moonlordExplosion.Dead) { MoonlordDeathDrama._explosions.Remove(moonlordExplosion); j--; } } bool flag = false; for (int k = 0; k < MoonlordDeathDrama._lightSources.Count; k++) { if (Main.player[Main.myPlayer].Distance(MoonlordDeathDrama._lightSources[k]) < 2000f) { flag = true; break; } } MoonlordDeathDrama._lightSources.Clear(); if (!flag) { MoonlordDeathDrama.requestedLight = 0f; } if (MoonlordDeathDrama.requestedLight != MoonlordDeathDrama.whitening) { if (Math.Abs(MoonlordDeathDrama.requestedLight - MoonlordDeathDrama.whitening) < 0.02f) { MoonlordDeathDrama.whitening = MoonlordDeathDrama.requestedLight; } else { MoonlordDeathDrama.whitening += (float)Math.Sign(MoonlordDeathDrama.requestedLight - MoonlordDeathDrama.whitening) * 0.02f; } } MoonlordDeathDrama.requestedLight = 0f; }
public void Update() { MoonlordDeathDrama.MoonlordExplosion moonlordExplosion = this; moonlordExplosion._frameCounter = moonlordExplosion._frameCounter + 1; }