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

◆ GetAlpha()

static float Terraria.WaterfallManager.GetAlpha ( float Alpha,
int maxSteps,
int waterfallType,
int y,
int s,
Tile tileCache )
inlinestaticprivate

Definition at line 934 of file WaterfallManager.cs.

935 {
936 float num = waterfallType switch
937 {
938 1 => 1f,
939 14 => 0.8f,
940 25 => 0.75f,
941 _ => (tileCache.wall != 0 || !((double)y < Main.worldSurface)) ? (0.6f * Alpha) : Alpha,
942 };
943 if (s > maxSteps - 10)
944 {
945 num *= (float)(maxSteps - s) / 10f;
946 }
947 return num;
948 }

References Microsoft.Xna.Framework.Graphics.Alpha, System.s, and Terraria.Main.worldSurface.

Referenced by Terraria.WaterfallManager.DrawWaterfall().