TO SEE HOW TO SETUP V1.1 ON THE XBOX 360 GOTO THE BOTTOM OF THE V1.1 DOCUMENTATION

Currently V1.1 is supported for both X86 and the Xbox 360

For the library to function correctly you only have to include a namespace and add 2 method calls in your project.
You must add this to your using statements at the top of your Game class.

using AndrewsXnaHelpers;

Once you have that included, at the top of your LoadContent() beneath where spriteBatch is created add this line.
Variables.SetVariables(graphics, Content, spriteBatch);

At the top of your Update loop add this line.
Variables.Update(gameTime);

Once those calls are done you now have full access to all of the library. The functions above only have to be called once in the Game class and only specific namespaces must be added to other classes to be able to use them.

I have created some template projects that people can use as a base or just an example of where everything should be.
To download them simply right click the link and click "Save Link As" and save it somewhere on your computer.
Version 1 Templates
X86
http://download969.mediafire.com/wiid9nyzmyfg/j3yywzomntg/Version1-X86-Template.zip
XBOX
http://download222.mediafire.com/nmjht2ljeyag/i1dmtgnyfv1/Version1-Xbox-Template.zip
Version 1.1 Templates
X86
http://download543.mediafire.com/t2b1tmdxn3lg/iyjdi3yg1ji/Version1.1-X86-Template.zip
I will be adding a template for the xbox 360 version of v1.1

If you don't want to download the templates then this is what the game1 class should look like.
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;
using AndrewsXnaHelpers;
namespace Example
{
public class Game1 : Microsoft.Xna.Framework.Game
{
GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
public Game1()
{
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
}
protected override void Initialize()
{
base.Initialize();
}
protected override void LoadContent()
{
spriteBatch = new SpriteBatch(GraphicsDevice);
Variables.SetVariables(graphics, Content, spriteBatch);
}
protected override void UnloadContent(){ }
protected override void Update(GameTime gameTime)
{
Variables.Update(gameTime);
base.Update(gameTime);
}
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
base.Draw(gameTime);
}
}
}

Last edited Jun 9, 2010 at 2:54 AM by Destroyer229, version 19

Comments

No comments yet.