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

◆ UpdateFlashingEffect()

void ReLogic.Peripherals.RGB.RgbKey.UpdateFlashingEffect ( )
inlineprivate

Definition at line 143 of file RgbKey.cs.

144 {
145 //IL_0029: Unknown result type (might be due to invalid IL or missing references)
146 //IL_002f: Unknown result type (might be due to invalid IL or missing references)
147 //IL_0035: Unknown result type (might be due to invalid IL or missing references)
148 float amount = (float)Math.Sin(_timeRemaining * _effectRate * ((float)Math.PI * 2f)) * 0.5f + 0.5f;
150 }
static double Sin(double a)
const double PI
Definition Math.cs:16
static Color Lerp(Color value1, Color value2, float amount)
Definition Color.cs:491

References ReLogic.Peripherals.RGB.RgbKey._effectRate, ReLogic.Peripherals.RGB.RgbKey._timeRemaining, ReLogic.Peripherals.RGB.RgbKey.BaseColor, ReLogic.Peripherals.RGB.RgbKey.CurrentColor, Microsoft.Xna.Framework.Color.Lerp(), System.Math.PI, System.Math.Sin(), and ReLogic.Peripherals.RGB.RgbKey.TargetColor.

Referenced by ReLogic.Peripherals.RGB.RgbKey.Update().