rhythmbullet/RhythmBullet/Zer01HD/Utilities/UI/Screen.cs

82 lines
1.6 KiB
C#

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RhythmBullet.Zer01HD.Utilities.UI
{
public enum ScreenState { EnterTransition, ExitTransition, Normal }
public class Screen
{
public virtual Vector2 ScreenSize
{
get; set;
}
ScreenState state;
public Screen(bool useEnterTransition = false)
{
state = useEnterTransition ? ScreenState.EnterTransition : ScreenState.Normal;
}
public virtual void Update(GameTime gameTime)
{
}
public virtual void Draw(SpriteBatch spriteBatch)
{
}
public virtual void EnteringTransition(double delta, bool assetsLoaded, ref Color backgroundColor)
{
}
public virtual Screen ExitingTransition(double delta, bool assetsLoaded, ref Color backgroundColor)
{
return null;
}
public virtual void Show()
{
}
public virtual void Hide()
{
}
public virtual void AssetLoadStateChange(bool state)
{
}
public ScreenState State
{
get
{
return state;
}
}
public void DoneTransition()
{
state = ScreenState.Normal;
}
public void StartExitTransition()
{
state = ScreenState.ExitTransition;
}
}
}