InterpolateColor
Introduction
Code Example
Camera.Main.UsePixelCoordinates();
for (int i = 0; i < 10; i++)
{
Sprite sprite = SpriteManager.AddSprite("Content/Bear.png");
sprite.TextureScale = 1;
sprite.X = -200 + 40 * i;
sprite.ColorOperation = ColorOperation.InterpolateColor;
sprite.Red = 1;
sprite.Green = 0;
sprite.Blue = 0;
// The maximum value for 'i' in this loop is 9, so let's make that full alpha
sprite.Alpha = i / 9.0f;
}Last updated
Was this helpful?