Functioning state before changing to using render targets
This commit is contained in:
13
RhythmBullet/Zer01HD/Utilities/UI/Interactive/BasicButton.cs
Normal file
13
RhythmBullet/Zer01HD/Utilities/UI/Interactive/BasicButton.cs
Normal 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
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@@ -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;
|
||||
|
@@ -12,10 +12,7 @@ namespace RhythmBullet.Zer01HD.Utilities.UI
|
||||
|
||||
public class Screen
|
||||
{
|
||||
public virtual Vector2 ScreenSize
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
public Rectangle ScreenSize;
|
||||
|
||||
ScreenState state;
|
||||
|
||||
|
Reference in New Issue
Block a user