TModLoader v1.4.4.9
TModLoader 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 1124 of file WaterfallManager.cs.

1125 {
1126 float num = waterfallType switch
1127 {
1128 1 => 1f,
1129 14 => 0.8f,
1130 25 => 0.75f,
1131 _ => (tileCache.wall != 0 || !((double)y < Main.worldSurface)) ? (0.6f * Alpha) : Alpha,
1132 };
1133 if (s > maxSteps - 10)
1134 {
1135 num *= (float)(maxSteps - s) / 10f;
1136 }
1137 return num;
1138 }

References Terraria.Main.worldSurface.

Referenced by Terraria.WaterfallManager.DrawWaterfall().

+ Here is the caller graph for this function: