source: 2011/23/sijoseha/Fera Proelia/Fera Proelia/Fera Proelia/GameScreen.cs @ 2124

Revision 2124, 994 bytes checked in by sijoseha, 9 years ago (diff)

Changes to how screens are handled. Doesn't really do anything yet.

Line 
1using System;
2using System.Collections.Generic;
3using Microsoft.Xna.Framework;
4using Microsoft.Xna.Framework.Graphics;
5
6namespace Fera_Proelia
7{
8    public abstract class GameScreen
9    {
10        public bool IsActive { get { return !otherScreenHasFocus; } }
11        bool otherScreenHasFocus;
12
13        public ScreenManager ScreenManager
14        {
15            get { return screenManager; }
16            internal set { screenManager = value; }
17        }
18        ScreenManager screenManager;
19
20        public GameScreen()
21        {
22
23        }
24        public virtual void LoadContent() { }
25        public virtual void UnloadContent() { }
26
27        public virtual void Update(GameTime gameTime, bool otherScreenHasFocus)
28        {
29            this.otherScreenHasFocus = otherScreenHasFocus;
30        }
31        public virtual void Draw(GameTime gameTime) { }
32
33        public void ExitScreen()
34        {
35            ScreenManager.RemoveScreen(this);
36        }
37    }
38}
Note: See TracBrowser for help on using the repository browser.