C# Class PantheonPrototype.Level

This is the preliminary level class. The level class handles rendering the map and handling all entities that happen to populate said map. These entities will be used to build the world and create event triggering, enemies, NPCs, etc. This should be where the majority of the game logic goes, via the interaction between entities. Level content will be loaded dynamically through some sort of WAD-type file.
显示文件 Open project: Bacon41/PantheonPrototype Class Usage Examples

Public Properties

Property Type Description
Camera Camera
addList Entity>.Dictionary
removeList List

Protected Properties

Property Type Description
dialogueManager DialogueManager
entities Entity>.Dictionary
levelMap Map
levelNum string
levelPlaying bool
levelStart bool
nextLevel string
questCreator QuestCreator
screenRect Microsoft.Xna.Framework.Rectangle

Public Methods

Method Description
Draw ( SpriteBatch spriteBatch ) : void

The Draw function will draw the level itself, as well as any subentities that are a part of the level. Each entity will be in charge of drawing itself, and the level will merely draw the physical level. (Tiles, Sprites, Etc)

Level ( GraphicsDevice graphicsDevice ) : System

The constructor for the Level class. Basically doesn't do anything important at this point.

Load ( string newLevel, string oldLevel, Pantheon gameReference ) : void

Loads the level from a descriptive script file on the harddrive.

Update ( GameTime gameTime, Pantheon gameReference ) : void

The Update function will run through the level and perform any necessary operations for processing the frame. This includes going through the list of active entities in the level and updating them as well.

Private Methods

Method Description
checkEntities ( List entityNames, List entityList, Pantheon gameReference ) : void

Checks the appropriate characteristics for the given entity collision.

checkObjects ( string entityName, Entity entity, FuncWorks.XNA.XTiled.MapObject obj, Pantheon gameReference ) : void

Checks the appropriate characteristics for the given object collision.

checkTiles ( string entityName, Entity entity, FuncWorks.XNA.XTiled.TileData tile ) : void

Checks the appropriate characteristics for the given tile collision.

detectCollisions ( Pantheon gameReference ) : void

A central function for handling all collisions.

Method Details

Draw() public method

The Draw function will draw the level itself, as well as any subentities that are a part of the level. Each entity will be in charge of drawing itself, and the level will merely draw the physical level. (Tiles, Sprites, Etc)
public Draw ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
return void

Level() public method

The constructor for the Level class. Basically doesn't do anything important at this point.
public Level ( GraphicsDevice graphicsDevice ) : System
graphicsDevice GraphicsDevice
return System

Load() public method

Loads the level from a descriptive script file on the harddrive.
public Load ( string newLevel, string oldLevel, Pantheon gameReference ) : void
newLevel string
oldLevel string
gameReference Pantheon
return void

Update() public method

The Update function will run through the level and perform any necessary operations for processing the frame. This includes going through the list of active entities in the level and updating them as well.
public Update ( GameTime gameTime, Pantheon gameReference ) : void
gameTime Microsoft.Xna.Framework.GameTime
gameReference Pantheon
return void

Property Details

Camera public_oe property

public Camera,PantheonPrototype Camera
return Camera

addList public_oe property

A list of entities to add to the level entity list.
public Dictionary addList
return Entity>.Dictionary

dialogueManager protected_oe property

protected DialogueManager,PantheonPrototype dialogueManager
return DialogueManager

entities protected_oe property

protected Dictionary entities
return Entity>.Dictionary

levelMap protected_oe property

protected Map levelMap
return Map

levelNum protected_oe property

protected string levelNum
return string

levelPlaying protected_oe property

protected bool levelPlaying
return bool

levelStart protected_oe property

protected bool levelStart
return bool

nextLevel protected_oe property

protected string nextLevel
return string

questCreator protected_oe property

protected QuestCreator,PantheonPrototype questCreator
return QuestCreator

removeList public_oe property

A list of entities to remove from the level entity list.
public List removeList
return List

screenRect protected_oe property

protected Rectangle,Microsoft.Xna.Framework screenRect
return Microsoft.Xna.Framework.Rectangle