public override void Update(GameTime gameTime) { BiomeHandler player = Main.LocalPlayer.GetModPlayer <BiomeHandler>(); Bootlegdust.ForEach(dust => dust.Update()); Bootlegdust.RemoveAll(dust => dust.time <= 0); if (visible) { if (!(player.ZoneVoidPre || player.ZoneJungleCorrupt || player.ZoneJungleBloody || player.ZoneJungleHoly || player.ZoneOvergrow)) { state = 0; } if (state == (int)OverlayState.Rift) { for (int k = 0; k <= Main.screenHeight; k++) { if (k % Main.rand.Next(3, 13) == 0 && Main.rand.Next(30) == 0) { VoidDust dus = new VoidDust(ModContent.GetTexture("StarlightRiver/GUI/Fire"), new Vector2(-15, k), new Vector2(Main.rand.NextFloat(1, 2), 0)); VoidDust dus2 = new VoidDust(ModContent.GetTexture("StarlightRiver/GUI/Fire"), new Vector2(Main.screenWidth, k), new Vector2(-Main.rand.NextFloat(1, 2), 0)); Bootlegdust.Add(dus); Bootlegdust.Add(dus2); } } } if (state == (int)OverlayState.CorruptJungle) { for (int k = 0; k <= Main.screenWidth; k++) { if (k % Main.rand.Next(5, 15) == 0 && Main.rand.Next(1000) == 0) { EvilDust dus = new EvilDust(ModContent.GetTexture("StarlightRiver/GUI/Corrupt"), new Vector2(k, Main.screenHeight), new Vector2(0, -1.4f)); Bootlegdust.Add(dus); } } } if (state == (int)OverlayState.BloodyJungle) { for (int k = 0; k <= Main.screenWidth; k++) { if (k % Main.rand.Next(5, 15) == 0 && Main.rand.Next(1500) == 0) { BloodDust dus = new BloodDust(ModContent.GetTexture("StarlightRiver/GUI/Blood"), new Vector2(k, 0), new Vector2(0, 2f)); Bootlegdust.Add(dus); } } } if (state == (int)OverlayState.HolyJungle) { for (int k = 0; k <= Main.screenWidth; k++) { if (k % Main.rand.Next(20, 40) == 0 && Main.rand.Next(750) == 0) { HolyDust dus = new HolyDust(ModContent.GetTexture("StarlightRiver/GUI/Light"), new Vector2(k, Main.rand.Next(Main.screenHeight)), Vector2.Zero); Bootlegdust.Add(dus); } } } /*if (state == (int)OverlayState.Overgrow) * { * for (int k = 0; k <= Main.screenWidth; k++) * { * if (k % Main.rand.Next(20, 40) == 0 && Main.rand.Next(550) == 0) * { * HolyDust dus = new HolyDust(ModContent.GetTexture("StarlightRiver/GUI/Holy"), new Vector2(k, Main.rand.Next(Main.screenHeight)), Vector2.Zero); * Bootlegdust.Add(dus); * } * } * }*/ } }
public override void Update(GameTime gameTime) { Bootlegdust.ForEach(VoidDust => VoidDust.Update()); Bootlegdust.RemoveAll(VoidDust => VoidDust.time <= 0); if (visible) { if (state == 1) { if (Main.LocalPlayer.GetModPlayer <AbilityHandler>().unlock[2] == 1) { for (int k = 0; k <= Main.screenWidth; k++) { if (k % Main.rand.Next(5, 15) == 0 && Main.rand.Next(4) == 0) { VoidDust dus = new VoidDust(ModContent.GetTexture("StarlightRiver/GUI/Fire"), new Vector2(k, -10), new Vector2(0, 2)); VoidDust dus2 = new VoidDust(ModContent.GetTexture("StarlightRiver/GUI/Fire"), new Vector2(k, Main.screenHeight), new Vector2(0, -2)); Bootlegdust.Add(dus); Bootlegdust.Add(dus2); } } for (int k = 0; k <= Main.screenHeight; k++) { if (k % Main.rand.Next(5, 15) == 0 && Main.rand.Next(4) == 0) { VoidDust dus = new VoidDust(ModContent.GetTexture("StarlightRiver/GUI/Fire"), new Vector2(-15, k), new Vector2(2, 0)); VoidDust dus2 = new VoidDust(ModContent.GetTexture("StarlightRiver/GUI/Fire"), new Vector2(Main.screenWidth, k), new Vector2(-2, 0)); Bootlegdust.Add(dus); Bootlegdust.Add(dus2); } } } else { for (int k = 0; k <= Main.screenWidth; k++) { if (k % Main.rand.Next(3, 13) == 0 && Main.rand.Next(4) == 0) { VoidDust2 dus = new VoidDust2(ModContent.GetTexture("StarlightRiver/GUI/Fire"), new Vector2(k, -10), new Vector2(0, 2)); VoidDust2 dus2 = new VoidDust2(ModContent.GetTexture("StarlightRiver/GUI/Fire"), new Vector2(k, Main.screenHeight), new Vector2(0, -2)); Bootlegdust.Add(dus); Bootlegdust.Add(dus2); } } for (int k = 0; k <= Main.screenHeight; k++) { if (k % Main.rand.Next(3, 13) == 0 && Main.rand.Next(4) == 0) { VoidDust2 dus = new VoidDust2(ModContent.GetTexture("StarlightRiver/GUI/Fire"), new Vector2(-15, k), new Vector2(2, 0)); VoidDust2 dus2 = new VoidDust2(ModContent.GetTexture("StarlightRiver/GUI/Fire"), new Vector2(Main.screenWidth, k), new Vector2(-2, 0)); Bootlegdust.Add(dus); Bootlegdust.Add(dus2); } } } } if (state == 2) { for (int k = 0; k <= Main.screenWidth; k++) { if (k % Main.rand.Next(5, 15) == 0 && Main.rand.Next(1000) == 0) { EvilDust dus = new EvilDust(ModContent.GetTexture("StarlightRiver/GUI/Corrupt"), new Vector2(k, Main.screenHeight), new Vector2(0, -1.4f)); Bootlegdust.Add(dus); } } } if (state == 3) { for (int k = 0; k <= Main.screenWidth; k++) { if (k % Main.rand.Next(5, 15) == 0 && Main.rand.Next(1500) == 0) { BloodDust dus = new BloodDust(ModContent.GetTexture("StarlightRiver/GUI/Blood"), new Vector2(k, 0), new Vector2(0, 2f)); Bootlegdust.Add(dus); } } } if (state == 4) { for (int k = 0; k <= Main.screenWidth; k++) { if (k % Main.rand.Next(20, 40) == 0 && Main.rand.Next(750) == 0) { HolyDust dus = new HolyDust(ModContent.GetTexture("StarlightRiver/GUI/Light"), new Vector2(k, Main.rand.Next(Main.screenHeight)), Vector2.Zero); Bootlegdust.Add(dus); } } } } if ( !Main.LocalPlayer.GetModPlayer <BiomeHandler>().ZoneVoidPre&& !Main.LocalPlayer.GetModPlayer <BiomeHandler>().ZoneJungleCorrupt&& !Main.LocalPlayer.GetModPlayer <BiomeHandler>().ZoneJungleBloody&& !Main.LocalPlayer.GetModPlayer <BiomeHandler>().ZoneJungleHoly ) { Bootlegdust.Clear(); } if (state == 0) { Bootlegdust.Clear(); } }