C# Class MrGravity.Import_Code.Importer

Imports an XML file into the game
显示文件 Open project: DizWARE/Mr-Gravity Class Usage Examples

Public Methods

Method Description
GetObjects ( PhysicsEnvironment &environment ) : List

Goes through all the entities and finds all of the ones that are Static, or physics(Dynamic maybe in the future) Creates and returns them using the data found in the xml file

GetPlayerEnd ( ) : PlayerEnd

Creates and returns a PlayerEnd using the info that is in the xml file

GetPlayerStart ( Level level ) : void

Gets the players start position

GetRails ( ) : List
GetTriggers ( ) : List

Gets all the triggers in the level

GetWalls ( Level level ) : List

UNUSED FOR NOW. MAY IN THE FUTURE, GATHER ALL THE INFO UP AND MAKE BIGGER BOUNDING BOXES FOR ENTIRE WALLS

ImportLevel ( Level level ) : Level

Goes through the xml file and translates the information

Importer ( Microsoft.Xna.Framework.Content.ContentManager content ) : System

Constructor for an importer object

Private Methods

Method Description
CreateSortedIndicies ( List walls, List indicies, bool cols ) : void

Creates the sorted indicies.

Method Details

GetObjects() public method

Goes through all the entities and finds all of the ones that are Static, or physics(Dynamic maybe in the future) Creates and returns them using the data found in the xml file
public GetObjects ( PhysicsEnvironment &environment ) : List
environment PhysicsEnvironment Environment that these items exist in
return List

GetPlayerEnd() public method

Creates and returns a PlayerEnd using the info that is in the xml file
public GetPlayerEnd ( ) : PlayerEnd
return MrGravity.Game_Objects.Static_Objects.PlayerEnd

GetPlayerStart() public method

Gets the players start position
public GetPlayerStart ( Level level ) : void
level Level
return void

GetRails() public method

public GetRails ( ) : List
return List

GetTriggers() public method

Gets all the triggers in the level
public GetTriggers ( ) : List
return List

GetWalls() public method

UNUSED FOR NOW. MAY IN THE FUTURE, GATHER ALL THE INFO UP AND MAKE BIGGER BOUNDING BOXES FOR ENTIRE WALLS
public GetWalls ( Level level ) : List
level Level
return List

ImportLevel() public method

Goes through the xml file and translates the information
public ImportLevel ( Level level ) : Level
level Level
return Level

Importer() public method

Constructor for an importer object
public Importer ( Microsoft.Xna.Framework.Content.ContentManager content ) : System
content Microsoft.Xna.Framework.Content.ContentManager Content Manager
return System