2019-01-14 20:06:17 -06:00
|
|
|
|
using Microsoft.Xna.Framework;
|
2018-11-01 01:10:49 -05:00
|
|
|
|
using Microsoft.Xna.Framework.Graphics;
|
2018-12-03 23:05:54 -06:00
|
|
|
|
using RecrownedAthenaeum.Screens.Transitions;
|
|
|
|
|
using RecrownedAthenaeum.UI.Book;
|
2018-12-04 23:37:05 -06:00
|
|
|
|
using RecrownedAthenaeum.Camera;
|
|
|
|
|
using RecrownedAthenaeum.ContentSystem;
|
|
|
|
|
using RecrownedAthenaeum.ScreenSystem;
|
2018-09-15 14:05:14 -05:00
|
|
|
|
|
2018-12-03 23:05:54 -06:00
|
|
|
|
namespace RecrownedAthenaeum.Screens.MainMenu
|
2018-09-15 14:05:14 -05:00
|
|
|
|
{
|
|
|
|
|
class MainScreen : Screen
|
|
|
|
|
{
|
2019-01-14 20:13:54 -06:00
|
|
|
|
readonly ContentManagerController assets;
|
|
|
|
|
readonly FadeAwayTransition fat;
|
|
|
|
|
readonly Texture2D background;
|
|
|
|
|
readonly Book book;
|
|
|
|
|
readonly MainPage mainPage;
|
2018-11-17 23:27:05 -06:00
|
|
|
|
|
|
|
|
|
public MainScreen(ContentManagerController assets) : base(true)
|
2018-09-15 14:05:14 -05:00
|
|
|
|
{
|
2018-11-17 23:27:05 -06:00
|
|
|
|
this.assets = assets;
|
2018-11-01 22:02:25 -05:00
|
|
|
|
background = assets.Get<Texture2D>("backgrounds/mainBG");
|
2018-11-12 19:43:03 -06:00
|
|
|
|
fat = new FadeAwayTransition(1.5f);
|
2018-11-15 01:22:35 -06:00
|
|
|
|
book = new Book();
|
|
|
|
|
mainPage = new MainPage(assets);
|
|
|
|
|
book.AddPages(mainPage);
|
|
|
|
|
}
|
|
|
|
|
|
2019-01-14 20:06:17 -06:00
|
|
|
|
public override void Initiate(Rectangle screenSize, Camera2D camera)
|
2018-11-15 01:22:35 -06:00
|
|
|
|
{
|
|
|
|
|
book.Initiate(camera, screenSize);
|
2019-01-14 20:06:17 -06:00
|
|
|
|
base.Initiate(screenSize, camera);
|
2018-11-15 01:22:35 -06:00
|
|
|
|
}
|
2018-11-01 22:02:25 -05:00
|
|
|
|
|
|
|
|
|
public override void Show()
|
|
|
|
|
{
|
2018-11-11 12:45:37 -06:00
|
|
|
|
Transitions.Add(fat);
|
2018-11-01 22:02:25 -05:00
|
|
|
|
base.Show();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Draw(SpriteBatch spriteBatch)
|
|
|
|
|
{
|
|
|
|
|
spriteBatch.Draw(background, ScreenSize, Color.White);
|
2018-11-12 19:43:03 -06:00
|
|
|
|
book.Draw(spriteBatch);
|
2018-11-01 22:02:25 -05:00
|
|
|
|
base.Draw(spriteBatch);
|
2018-09-15 14:05:14 -05:00
|
|
|
|
}
|
2018-11-12 00:33:40 -06:00
|
|
|
|
|
|
|
|
|
public override void Update(GameTime gameTime)
|
|
|
|
|
{
|
|
|
|
|
book.Update(gameTime);
|
|
|
|
|
base.Update(gameTime);
|
|
|
|
|
}
|
2018-09-15 14:05:14 -05:00
|
|
|
|
}
|
|
|
|
|
}
|