Skip to content

Commit

Permalink
Merge branch 'master' of github.com:zzorn/Spike3D
Browse files Browse the repository at this point in the history
  • Loading branch information
Dzarg authored and Dzarg committed May 21, 2010
2 parents a1bc2be + 31e3176 commit d3237a8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions SpaceRun/SpaceRun/Game1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public class Game1 : Microsoft.Xna.Framework.Game

public SpriteFont debugFont;

public Network network;

public Game1()
{
graphics = new GraphicsDeviceManager(this);
Expand All @@ -37,6 +39,10 @@ public Game1()
/// </summary>
protected override void Initialize()
{
Components.Add(new GamerServicesComponent(this));

network = new Network();

base.Initialize();
}

Expand Down Expand Up @@ -93,6 +99,11 @@ protected override void Update(GameTime gameTime)
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
this.Exit();

if (GamePad.GetState(PlayerIndex.One).Buttons.Start == ButtonState.Pressed)
network.HostGame();
else if (GamePad.GetState(PlayerIndex.One).Buttons.Y == ButtonState.Pressed)
network.JoinGame();

EntityManager.get().updateEntities(gameTime);

base.Update(gameTime);
Expand Down
2 changes: 1 addition & 1 deletion SpaceRun/SpaceRun/Network.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace SpaceRun
{
class Network
public class Network
{
private enum EntityEventType { State, Remove }
private enum GamePacketType { PlayerShip, Ship, Asteroid }
Expand Down

0 comments on commit d3237a8

Please sign in to comment.