XNACS1Lib: CSS490 Spring 2011
The XNACS1Base type exposes the following members.
Constructors
Name | Description | |
---|---|---|
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 | |
---|---|---|
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).) |
|
DrawWorld |
subclass can override this to customize the redrawing of the world. This function is called 40 times a second.
|
|
EchoToBottomStatus |
Echo message to the status area located at the bottom of the drawing window.
|
|
EchoToTopStatus |
Echo message to the status area located at the top of the drawing window.
|
|
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()()()().) |
|
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.
|
|
PlayACue |
Play the spcified audio cue for the specified length of seconds.
|
|
PlayBackgroundAudio |
Plays the specific audo file name continuously as the background audio.
|
|
RandomFloat()()()() |
Returns a random number between 0.0 to 1.0
|
|
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
|
|
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
|
|
RandomInt()()()() |
Returns a random integer between 0 and some VERY LARGE number.
|
|
RandomInt(Int32) |
Returns a random integer between 0 and max.
|
|
RandomInt(Int32, Int32) |
Returns a random integer between min and max.
|
|
SetAppWindowPixelDimension |
Sets the Size of the Appplication Window (in pixel unit).
|
|
SetBottomEchoColor |
Sets the bottom status echo font color.
|
|
SetKeyboardMapFile |
Reassigns the keyboard mapping for the keyboard to gamepad to a new mapping, specified by the ini file passed.
Example: SetKeyboardMapFile(".\\CS1setting.ini");
|
|
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
|
|
SetTopEchoColor |
Sets the top status echo font color.
|
|
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).) |
|
UpdateWorld |
Subclass should override this method to update the world. This function is called 40 times a second.
|
Properties
Name | Description | |
---|---|---|
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.
|