began main page with reorganization.
This commit is contained in:
19
RhythmBullet/Zer01HD/Game/Screens/MainMenu/MainPage.cs
Normal file
19
RhythmBullet/Zer01HD/Game/Screens/MainMenu/MainPage.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using RhythmBullet.Zer01HD.UI.Book;
|
||||
using RhythmBullet.Zer01HD.Utilities.ContentSystem;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace RhythmBullet.Zer01HD.Game.Screens.MainMenu
|
||||
{
|
||||
internal class MainPage : Page
|
||||
{
|
||||
internal MainPage(ContentSystem assets, GraphicsDevice graphicsDevice) : base(0, 0, graphicsDevice)
|
||||
{
|
||||
assets.Get<Texture2D>("title");
|
||||
}
|
||||
}
|
||||
}
|
49
RhythmBullet/Zer01HD/Game/Screens/MainMenu/MainScreen.cs
Normal file
49
RhythmBullet/Zer01HD/Game/Screens/MainMenu/MainScreen.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using RhythmBullet.Zer01HD.Game.Screens.Transitions;
|
||||
using RhythmBullet.Zer01HD.UI;
|
||||
using RhythmBullet.Zer01HD.Utilities.ContentSystem;
|
||||
using RhythmBullet.Zer01HD.Utilities.UI;
|
||||
using RhythmBullet.Zer01HD.Utilities.ScreenSystem;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using RhythmBullet.Zer01HD.UI.Book;
|
||||
|
||||
namespace RhythmBullet.Zer01HD.Game.Screens.MainMenu
|
||||
{
|
||||
class MainScreen : Screen
|
||||
{
|
||||
FadeAwayTransition fat;
|
||||
Texture2D background;
|
||||
Book book;
|
||||
public MainScreen(ContentSystem assets) : base(true)
|
||||
{
|
||||
background = assets.Get<Texture2D>("backgrounds/mainBG");
|
||||
fat = new FadeAwayTransition(3f);
|
||||
book = new Book(Camera);
|
||||
}
|
||||
|
||||
public override void Show()
|
||||
{
|
||||
Transitions.Add(fat);
|
||||
base.Show();
|
||||
}
|
||||
|
||||
public override void Draw(SpriteBatch spriteBatch)
|
||||
{
|
||||
book.Draw(spriteBatch);
|
||||
spriteBatch.Draw(background, ScreenSize, Color.White);
|
||||
base.Draw(spriteBatch);
|
||||
}
|
||||
|
||||
public override void Update(GameTime gameTime)
|
||||
{
|
||||
book.Update(gameTime);
|
||||
base.Update(gameTime);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user