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

◆ Update()

override void Terraria.GameContent.Shaders.SandstormShaderData.Update ( GameTime gameTime)
inlinevirtual

Reimplemented from Terraria.Graphics.Shaders.ScreenShaderData.

Definition at line 15 of file SandstormShaderData.cs.

16 {
17 Vector2 vector = new Vector2(0f - Main.windSpeedCurrent, -1f) * new Vector2(20f, 0.1f);
18 vector.Normalize();
19 vector *= new Vector2(2f, 0.2f);
20 if (!Main.gamePaused && Main.hasFocus)
21 {
22 _texturePosition += vector * (float)gameTime.ElapsedGameTime.TotalSeconds;
23 }
24 _texturePosition.X %= 10f;
25 _texturePosition.Y %= 10f;
26 UseDirection(vector);
27 base.Update(gameTime);
28 }
ScreenShaderData UseDirection(Vector2 direction)

References Terraria.GameContent.Shaders.SandstormShaderData._texturePosition, Terraria.Main.gamePaused, Terraria.Main.hasFocus, Microsoft.Xna.Framework.Vector2.Normalize(), Terraria.Graphics.Shaders.ScreenShaderData.UseDirection(), and Terraria.Main.windSpeedCurrent.