1 | using System; |
---|
2 | using System.Collections.Generic; |
---|
3 | using System.Linq; |
---|
4 | using Microsoft.Xna.Framework; |
---|
5 | using Microsoft.Xna.Framework.Audio; |
---|
6 | using Microsoft.Xna.Framework.Content; |
---|
7 | using Microsoft.Xna.Framework.GamerServices; |
---|
8 | using Microsoft.Xna.Framework.Graphics; |
---|
9 | using Microsoft.Xna.Framework.Input; |
---|
10 | using Microsoft.Xna.Framework.Media; |
---|
11 | using ALTK; |
---|
12 | |
---|
13 | namespace ALTK |
---|
14 | { |
---|
15 | /// <summary> |
---|
16 | /// This is a game component that implements IUpdateable. |
---|
17 | /// </summary> |
---|
18 | public class ALTKHandler : Microsoft.Xna.Framework.GameComponent |
---|
19 | { |
---|
20 | public ALTKHandler(Game game) |
---|
21 | : base(game) |
---|
22 | { |
---|
23 | // TODO: Construct any child components here |
---|
24 | } |
---|
25 | |
---|
26 | public static Loader Loader; |
---|
27 | public static Cursor Cursor; |
---|
28 | public static StaticAnimHandler StaticAnimHandler; |
---|
29 | public static GUI.Dialogs.ExitWindow ExitWindow; |
---|
30 | public static GUI.AMessageDisplay MessageDisplay; |
---|
31 | |
---|
32 | /// <summary> |
---|
33 | /// Allows the game component to perform any initialization it needs to before starting |
---|
34 | /// to run. This is where it can query for any required services and load content. |
---|
35 | /// </summary> |
---|
36 | public override void Initialize() |
---|
37 | { |
---|
38 | // TODO: Add your initialization code here |
---|
39 | |
---|
40 | base.Initialize(); |
---|
41 | |
---|
42 | Loader = new Loader(Game); |
---|
43 | Loader.Initialize(); |
---|
44 | |
---|
45 | StaticAnimHandler = new ALTK.StaticAnimHandler(Game); |
---|
46 | StaticAnimHandler.Initialize(); |
---|
47 | Game.Components.Add(StaticAnimHandler); |
---|
48 | |
---|
49 | Cursor = new Cursor(Game); |
---|
50 | Cursor.Initialize(); |
---|
51 | Game.Components.Add(Cursor); |
---|
52 | |
---|
53 | ExitWindow = new GUI.Dialogs.ExitWindow(Game); |
---|
54 | ExitWindow.Initialize(); |
---|
55 | ExitWindow.Visible = false; |
---|
56 | ExitWindow.Enabled = false; |
---|
57 | Game.Components.Add(ExitWindow); |
---|
58 | |
---|
59 | MessageDisplay = new GUI.AMessageDisplay(Game); |
---|
60 | MessageDisplay.backgroundTextureColor = new Color(0, 192, 0, 128); |
---|
61 | MessageDisplay.Width = ALTKConstants.WindowWidth; |
---|
62 | MessageDisplay.TextColor = Color.Blue; |
---|
63 | MessageDisplay.FontPath = "aMainFont"; |
---|
64 | MessageDisplay.UpdateFont(""); |
---|
65 | MessageDisplay.Initialize(); |
---|
66 | MessageDisplay.CreateBackgroundTexture(ALTKConstants.WindowWidth); |
---|
67 | Game.Components.Add(MessageDisplay); |
---|
68 | |
---|
69 | } |
---|
70 | |
---|
71 | /// <summary> |
---|
72 | /// Allows the game component to update itself. |
---|
73 | /// </summary> |
---|
74 | /// <param name="gameTime">Provides a snapshot of timing values.</param> |
---|
75 | public override void Update(GameTime gameTime) |
---|
76 | { |
---|
77 | // TODO: Add your update code here |
---|
78 | |
---|
79 | base.Update(gameTime); |
---|
80 | } |
---|
81 | } |
---|
82 | } |
---|