Revision 2124,
994 bytes
checked in by sijoseha, 11 years ago
(diff) |
Changes to how screens are handled. Doesn't really do anything yet.
|
Line | |
---|
1 | using System; |
---|
2 | using System.Collections.Generic; |
---|
3 | using Microsoft.Xna.Framework; |
---|
4 | using Microsoft.Xna.Framework.Graphics; |
---|
5 | |
---|
6 | namespace 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.