This project is read-only.

IXNAE Documentation

Basics
How to use
GameSprites

Basics

IXNAE is made up of multiple components which do different things. The GameSprite class allows you to animate images and draw them on the screen, the GameObject class provides a simple way to create a movable object on the screen, the GameInput class allows you to get input from the Keyboard, Mouse, Xbox 360 controller, and Zune, and so on.

This documentation will show you how to start using IXNAE and give the basics on how to use each component.

How to use

To start using IXNAE, download the engine from the Downloads page and extract the Zip folder. Next, open up Visual C# 2008 Express and start a new XNA 3.1 project. In the Solution Explorer, right-click References and then click "Add reference". Choose the Browse tab and browse to where you extracted IXNAE. Double-click IXNAE_Engine.dll and it will be added to your project. Now, go into your Game1.cs file and add under all the Using statements:

using IXNAE;

Great! You can now start using IXNAE in your game!

GameSprites

One of the most basic components in IXNAE is the GameSprite. In order to create a GameSprite, you'll need either a single image for no animation, or a sprite sheet for animation. To create a new GameSprite, first declare it at the beginning of the Game1 class, and then use a line like this in your LoadContent method:

sprite = new GameSprite(Content.Load<Texture2D>("spritename"), 1, 1);

The first argument loads a 2D texture from the specified filepath. This is the base image that the GameSprite will use. The second and third arguments are the rows and columns, respectively, that your sprite sheet contains. For single images, this would be simply 1 and 1.

Once you've created a GameSprite, you can play or pause the animation, draw it on the screen, scale it, and much more.

Basic Methods and Properties

Play() : Plays the animation
Pause() : Pauses the animation
Scale : Specifies the stretching to use for the sprite
AnimationSpeed : How fast to play the animation
Looping : Whether or not the animation repeats itself after it's done
AnimationEnded : Event rasied every time the animation finishes

Last edited Nov 1, 2009 at 12:35 PM by Ianprime0509, version 6

Comments

No comments yet.