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

◆ GetColor2()

Color Terraria.GameContent.Golf.FancyGolfPredictionLine.GetColor2 ( float index)
inlineprivate

Definition at line 109 of file FancyGolfPredictionLine.cs.

110 {
111 float num = index * 0.5f - _time * (float)Math.PI * 1.5f;
112 int num2 = (int)Math.Floor(num) % _colors.Length;
113 if (num2 < 0)
114 {
115 num2 += _colors.Length;
116 }
117 int num3 = (num2 + 1) % _colors.Length;
118 float amount = num - (float)Math.Floor(num);
120 color.A = 64;
121 return color * 0.6f;
122 }
const double PI
Definition Math.cs:16
static double Floor(double d)
static Color Lerp(Color value1, Color value2, float amount)
Definition Color.cs:491

References Terraria.GameContent.Golf.FancyGolfPredictionLine._colors, Terraria.GameContent.Golf.FancyGolfPredictionLine._time, System.Math.Floor(), System.index, Microsoft.Xna.Framework.Color.Lerp(), and System.Math.PI.

Referenced by Terraria.GameContent.Golf.FancyGolfPredictionLine.Draw().