]> Dogcows Code - chaz/carfire/blob - CarFire/CarFire/CarFire/Game.cs
Modified to work with Display class
[chaz/carfire] / CarFire / CarFire / CarFire / Game.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using Microsoft.Xna.Framework;
6 using Microsoft.Xna.Framework.Content;
7 using Microsoft.Xna.Framework.Graphics;
8 using Microsoft.Xna.Framework.Input;
9
10 namespace CarFire
11 {
12 public class Game : IDeterministicGame
13 {
14 #region IDeterministicGame Members
15 List<Player> mPlayers;
16 Display mDisplay;
17 Map mMap;
18
19 public Game()
20 {
21 mDisplay = new Display();
22 }
23 public void LoadContent(ContentManager contentManager)
24 {
25 //Texture2D everything = contentManager.Load<Texture2D>("default");
26 mDisplay.LoadContent(contentManager);
27 }
28
29 public void UnloadContent()
30 {
31 }
32
33 public Vector2 PreferredScreenSize
34 {
35 get { return new Vector2(800, 600); }
36 }
37
38 public int MinimumSupportedPlayers
39 {
40 get { return 1; }
41 }
42
43 public int MaximumSupportedPlayers
44 {
45 get { return 4; }
46 }
47
48 public void ResetGame(object[] playerIdentifiers, object thisPlayer)
49 {
50 }
51
52 public long CurrentFrameNumber
53 {
54 get { return 0; }
55 }
56
57 public long CurrentChecksum
58 {
59 get { return 0; }
60 }
61
62 public void ApplyKeyInput(object playerIdentifier, Keys key, bool isKeyPressed)
63 {
64 }
65
66 public void ApplyMouseLocationInput(object playerIdentifier, int x, int y)
67 {
68 }
69
70 public void ApplyMouseButtonInput(object playerIdentifier, bool isButtonPressed)
71 {
72 }
73
74 public bool IsGameOver(object playerIdentifier)
75 {
76 return false;
77 }
78
79 public bool IsTerminated(object playerIdentifier)
80 {
81 return false;
82 }
83
84 public long Update(TimeSpan timespan)
85 {
86 mDisplay.Update(timespan);
87 return CurrentFrameNumber;
88 }
89
90 public long Draw(SpriteBatch spriteBatch)
91 {
92 mDisplay.Draw(spriteBatch);
93 return CurrentFrameNumber;
94 }
95
96 #endregion
97 }
98 }
This page took 0.037258 seconds and 5 git commands to generate.