Definition at line 183 of file PartySky.cs.
184 {
186 {
190 {
192 }
193 }
194 if ((
double)Main.screenPosition.Y > Main.worldSurface * 16.0 || Main.gameMenu ||
_opacity <= 0f)
195 {
196 return;
197 }
198 int num = -1;
199 int num2 = 0;
200 for (
int j = 0; j <
_balloons.Length; j++)
201 {
203 if (num == -1 && depth < maxDepth)
204 {
205 num = j;
206 }
207 if (depth <= minDepth)
208 {
209 break;
210 }
211 num2 = j;
212 }
213 if (num == -1)
214 {
215 return;
216 }
217 Vector2 vector = Main.screenPosition +
new Vector2(Main.screenWidth >> 1, Main.screenHeight >> 1);
219 for (int k = num; k < num2; k++)
220 {
222 {
223 Color color =
new Color(Main.ColorOfTheSkies.ToVector4() * 0.9f +
new Vector4(0.1f)) * 0.8f;
224 float num3 = 1f;
226 {
227 num3 = 0.6f;
228 }
230 {
231 num3 = 0.7f;
232 }
234 {
235 num3 = 0.8f;
236 }
238 {
239 num3 = 0.9f;
240 }
241 num3 *= 0.9f;
242 color =
new Color((
int)((
float)(
int)color.
R * num3), (
int)((
float)(
int)color.
G * num3), (
int)((
float)(
int)color.
B * num3), (
int)((
float)(
int)color.
A * num3));
245 position = (position - vector) * vector2 + vector - Main.screenPosition;
246 position.X = (position.X + 500f) % 4000f;
247 if (position.X < 0f)
248 {
249 position.X += 4000f;
250 }
251 position.X -= 500f;
252 if (rectangle.
Contains((
int)position.X, (
int)position.Y))
253 {
255 }
256 }
257 }
258 }
void Draw(Texture2D texture, Vector2 position, Color color)
bool Contains(int x, int y)
References Terraria.GameContent.Skies.PartySky._active, Terraria.GameContent.Skies.PartySky._balloons, Terraria.GameContent.Skies.PartySky._leaving, Terraria.GameContent.Skies.PartySky._opacity, Microsoft.Xna.Framework.Color.A, Terraria.GameContent.Skies.PartySky.Balloon.Active, Terraria.Graphics.Effects.Active, Microsoft.Xna.Framework.Color.B, Microsoft.Xna.Framework.Graphics.Color, Terraria.Main.ColorOfTheSkies, Microsoft.Xna.Framework.Rectangle.Contains(), Microsoft.Xna.Framework.Graphics.Depth, Terraria.GameContent.Skies.PartySky.Balloon.Depth, Microsoft.Xna.Framework.Graphics.SpriteBatch.Draw(), Microsoft.Xna.Framework.Color.G, Terraria.Main.gameMenu, Terraria.GameContent.Skies.PartySky.Balloon.Position, Microsoft.Xna.Framework.Color.R, Terraria.Main.screenHeight, Terraria.Main.screenPosition, Terraria.Main.screenWidth, Microsoft.Xna.Framework.Graphics.Vector2, Terraria.Main.worldSurface, Microsoft.Xna.Framework.Vector2.X, Microsoft.Xna.Framework.Vector2.Y, and Microsoft.Xna.Framework.Vector2.Zero.