Functioning state before changing to using render targets

This commit is contained in:
2018-11-01 22:02:25 -05:00
parent 9da8233eda
commit 44b2c74ff5
8 changed files with 78 additions and 32 deletions

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RhythmBullet.Zer01HD.Utilities.UI.Interactive
{
class BasicButton
{
}
}

View File

@@ -9,6 +9,8 @@ namespace RhythmBullet.Zer01HD.Game
{
class LoadingScreen : Screen
{
private const float ENTER_RATE = 2f;
private const float EXIT_RATE = 1f;
readonly Texture2D texture;
Color color;
Rectangle textureBounds;
@@ -53,9 +55,9 @@ namespace RhythmBullet.Zer01HD.Game
{
if (!recorded)
{
rR = (Color.White.R - BGColor.R) / 2f;
rG = (Color.White.G - BGColor.G) / 2f;
rB = (Color.White.B - BGColor.B) / 2f;
rR = (Color.White.R - BGColor.R) / ENTER_RATE;
rG = (Color.White.G - BGColor.G) / ENTER_RATE;
rB = (Color.White.B - BGColor.B) / ENTER_RATE;
recorded = true;
}
progR += rR * deltaf;
@@ -85,7 +87,7 @@ namespace RhythmBullet.Zer01HD.Game
}
if (progC > 0)
{
float rate = deltaf * 255 / 1f;
float rate = deltaf * 255 / EXIT_RATE;
progC -= rate;
progC = Math.Max(progC, 0);
color.R = (byte)progC;

View File

@@ -12,10 +12,7 @@ namespace RhythmBullet.Zer01HD.Utilities.UI
public class Screen
{
public virtual Vector2 ScreenSize
{
get; set;
}
public Rectangle ScreenSize;
ScreenState state;