Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Update()

override void Terraria.GameContent.Skies.PartySky.Update ( GameTime gameTime)
inline

Definition at line 136 of file PartySky.cs.

137 {
138 if (!MultipleSkyWorkaroundFix && Main.dayRate == 0)
139 {
140 return;
141 }
143 if (Main.gamePaused || !Main.hasFocus)
144 {
145 return;
146 }
147 _opacity = Utils.Clamp(_opacity + (float)IsNearParty().ToDirectionInt() * 0.01f, 0f, 1f);
148 for (int i = 0; i < _balloons.Length; i++)
149 {
150 if (!_balloons[i].Active)
151 {
152 continue;
153 }
154 _balloons[i].Frame++;
156 _balloons[i].Position.X += Main.windSpeedCurrent * (3f - _balloons[i].Speed);
157 if (!(_balloons[i].Position.Y < 300f))
158 {
159 continue;
160 }
161 if (!_leaving)
162 {
163 ResetBalloon(i);
164 _balloons[i].Position = new Vector2(_random.Next(0, Main.maxTilesX) * 16, (float)Main.worldSurface * 16f + 1600f);
165 if (_random.Next(30) == 0)
166 {
168 }
169 }
170 else
171 {
172 _balloons[i].Active = false;
174 }
175 }
176 if (_balloonsDrawing == 0)
177 {
178 _active = false;
179 }
180 _active = true;
181 }
Asset< Texture2D >[] _textures
Definition PartySky.cs:77

References Terraria.GameContent.Skies.PartySky._active, Terraria.GameContent.Skies.PartySky._balloons, Terraria.GameContent.Skies.PartySky._balloonsDrawing, Terraria.GameContent.Skies.PartySky._leaving, Terraria.GameContent.Skies.PartySky._opacity, Terraria.GameContent.Skies.PartySky._random, Terraria.GameContent.Skies.PartySky._textures, Terraria.GameContent.Skies.PartySky.Balloon.Active, Terraria.Graphics.Effects.Active, Terraria.Main.dayRate, Terraria.GameContent.Skies.PartySky.Balloon.Frame, Terraria.Main.gamePaused, Terraria.Main.hasFocus, Terraria.GameContent.Skies.PartySky.IsNearParty(), Terraria.Main.maxTilesX, Terraria.GameContent.Skies.PartySky.MultipleSkyWorkaroundFix, Terraria.Utilities.UnifiedRandom.Next(), Terraria.GameContent.Skies.PartySky.Balloon.Position, Terraria.GameContent.Skies.PartySky.ResetBalloon(), Terraria.GameContent.Skies.PartySky.Balloon.Speed, Terraria.GameContent.Skies.PartySky.Balloon.Texture, ReLogic.Content.Asset< T >.Value, Microsoft.Xna.Framework.Graphics.Vector2, Terraria.Main.worldSurface, Microsoft.Xna.Framework.Vector2.X, and Microsoft.Xna.Framework.Vector2.Y.