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