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

◆ GetCorrWeight()

float Terraria.ModLoader.ModSceneEffect.GetCorrWeight ( Player player)
inlinepackage

Combines Priority and Weight to determine what SceneEffect should be active. Priority is used to do primary sorting with respect to vanilla SceneEffect. Weight will be used if multiple SceneEffect have the same SceneEffectPriority so as to attempt to distinguish them based on their needs.

Definition at line 81 of file ModSceneEffect.cs.

82 {
83 return Math.Max(Math.Min(GetWeight(player), 1f), 0f) + (float)Priority;
84 }
virtual SceneEffectPriority Priority
The T:Terraria.ModLoader.SceneEffectPriority of this SceneEffect layer. Determines the relative posit...
virtual float GetWeight(Player player)
Is invoked when two or more modded SceneEffect layers are active within the same P:Terraria....

References Terraria.ModLoader.ModSceneEffect.GetWeight(), and Terraria.ModLoader.ModSceneEffect.Priority.

+ Here is the call graph for this function: