XNACS1Lib: CSS490 Spring 2011

The XNACS1Base type exposes the following members.

Constructors

  Name Description
Public method XNACS1Base
This is the constructor of the base class for the library. You can define your own constructor to initialize your instance variables. You are free to _not_ implement a constructor. You will receive a defualt applicaiton window with HDTV aspect ratio.

Methods

  Name Description
Protected method Draw
Do not override this method! This method is used by the XNACS1Lib to setup all the internal and font drawing. Override DrawWorld() if you are going to control the drawing of your primitives. Otherwise, you don't need to worry about drawing.
(Overrides GameDraw(GameTime).)
Protected method DrawWorld
subclass can override this to customize the redrawing of the world. This function is called 40 times a second.
Public method Static member EchoToBottomStatus
Echo message to the status area located at the bottom of the drawing window.
Public method Static member EchoToTopStatus
Echo message to the status area located at the top of the drawing window.
Protected method Initialize
Do not override this method! This method is used by the XNACS1Lib to create and initialize the entire system. Override InitializeWorld() and perform all your intialization there! Allows the game to perform any initialization it needs to before starting to run. This is where it can query for any required services and load any non-graphic related content. Calling base.Initialize will enumerate through any components and initialize them as well.
(Overrides GameInitialize()()()().)
Protected method InitializeWorld
Subclass should override this to define the World Cooridnate origin and width, and to allocate and otherwise initialize the application state. This method is called once at the beginning of the application.
Public method Static member PlayACue
Play the spcified audio cue for the specified length of seconds.
Public method Static member PlayBackgroundAudio
Plays the specific audo file name continuously as the background audio.
Public method Static member RandomFloat()()()()
Returns a random number between 0.0 to 1.0
Public method Static member RandomFloat(Single)
Returns a random float between 0 and max. This function may return 0, or may return a number that's close to max, but will never return max itself
Public method Static member RandomFloat(Single, Single)
Returns a float between min and max. This function may return min, or may return a number that's close to max, but will never return max itself
Public method Static member RandomInt()()()()
Returns a random integer between 0 and some VERY LARGE number.
Public method Static member RandomInt(Int32)
Returns a random integer between 0 and max.
Public method Static member RandomInt(Int32, Int32)
Returns a random integer between min and max.
Public method Static member SetAppWindowPixelDimension
Sets the Size of the Appplication Window (in pixel unit).
Public method Static member SetBottomEchoColor
Sets the bottom status echo font color.
Public method Static member SetKeyboardMapFile
Reassigns the keyboard mapping for the keyboard to gamepad to a new mapping, specified by the ini file passed. Example: SetKeyboardMapFile(".\\CS1setting.ini");
Public method Static member SetPhoneOrientation
Meaningful only when run on a Windows Phone device. Enable/Disable changing orientation based on the phone's physical settings. Valid orientations are: Portrait, LandscapeLeft, LandscapeRight
Public method Static member SetTopEchoColor
Sets the top status echo font color.
Protected method Update
Do not override this method! This method is used by the XNACS1Lib to maintain and update the system internal state. Override UpdateWorld() and perform all your application specific update there!
(Overrides GameUpdate(GameTime).)
Protected method UpdateWorld
Subclass should override this method to update the world. This function is called 40 times a second.

Properties

  Name Description
Public property Static member GamePad
For accessing the state of the XBOX 360 GamePad Controller. In the absence of a GamePad controller, the keyboard will be polled according to the default mapping.

See Also