internal override void RenderBackground(float Scale)
{
if (this.CurrentBackgroundIndex != this.PreviousBackgroundIndex)
{
switch (this.Backgrounds[CurrentBackgroundIndex].Mode)
{
case BackgroundTransitionMode.FadeIn:
Renderer.RenderBackground(this.Backgrounds[PreviousBackgroundIndex], 1.0f, Scale);
Renderer.SetAlphaFunc(AlphaFunction.Greater, 0.0f);
Renderer.RenderBackground(this.Backgrounds[CurrentBackgroundIndex], this.CurrentAlpha, Scale);
break;
case BackgroundTransitionMode.FadeOut:
Renderer.RenderBackground(this.Backgrounds[CurrentBackgroundIndex], 1.0f, Scale);
Renderer.SetAlphaFunc(AlphaFunction.Greater, 0.0f);
Renderer.RenderBackground(this.Backgrounds[PreviousBackgroundIndex], this.CurrentAlpha, Scale);
break;
}
}
else
{
Renderer.RenderBackground(this.Backgrounds[CurrentBackgroundIndex], 1.0f, Scale);
}
}