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

◆ DrawWaterfall() [2/2]

void Terraria.WaterfallManager.DrawWaterfall ( int waterfallType,
int x,
int y,
float opacity,
Vector2 position,
Rectangle sourceRect,
Color color,
SpriteEffects effects )
inlineprivate

Definition at line 873 of file WaterfallManager.cs.

874 {
875 Texture2D value = waterfallTexture[waterfallType].Value;
876 if (waterfallType == 25)
877 {
878 Lighting.GetCornerColors(x, y, out var vertices);
879 LiquidRenderer.SetShimmerVertexColors(ref vertices, opacity, x, y);
880 Main.tileBatch.Draw(value, position + new Vector2(0f, 0f), sourceRect, vertices, default(Vector2), 1f, effects);
881 sourceRect.Y += 42;
882 LiquidRenderer.SetShimmerVertexColors_Sparkle(ref vertices, opacity, x, y, top: true);
883 Main.tileBatch.Draw(value, position + new Vector2(0f, 0f), sourceRect, vertices, default(Vector2), 1f, effects);
884 }
885 else
886 {
887 Main.spriteBatch.Draw(value, position, sourceRect, color, 0f, default(Vector2), 1f, effects, 0f);
888 }
889 }
static void SetShimmerVertexColors(ref VertexColors colors, float opacity, int x, int y)
static VertexColors SetShimmerVertexColors_Sparkle(ref VertexColors colors, float opacity, int x, int y, bool top)
Asset< Texture2D >[] waterfallTexture

References Terraria.Lighting.GetCornerColors(), Terraria.GameContent.Liquid.LiquidRenderer.SetShimmerVertexColors(), Terraria.GameContent.Liquid.LiquidRenderer.SetShimmerVertexColors_Sparkle(), Terraria.Main.spriteBatch, Terraria.Main.tileBatch, ReLogic.Content.Asset< T >.Value, System.value, Microsoft.Xna.Framework.Graphics.Vector2, and Terraria.WaterfallManager.waterfallTexture.