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.
Afficher le fichier Open project: Bacon41/PantheonPrototype Class Usage Examples

Méthodes publiques

Свойство Type Description
Camera Camera
addList Entity>.Dictionary
removeList List

Protected Properties

Свойство Type Description
dialogueManager DialogueManager
entities Entity>.Dictionary
levelMap Map
levelNum string
levelPlaying bool
levelStart bool
nextLevel string
questCreator QuestCreator
screenRect Microsoft.Xna.Framework.Rectangle

Méthodes publiques

Méthode 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

Méthode 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 méthode

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
Résultat void

Level() public méthode

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

Load() public méthode

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
Résultat void

Update() public méthode

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
Résultat void

Property Details

Camera public_oe property

public Camera,PantheonPrototype Camera
Résultat Camera

addList public_oe property

A list of entities to add to the level entity list.
public Dictionary addList
Résultat Entity>.Dictionary

dialogueManager protected_oe property

protected DialogueManager,PantheonPrototype dialogueManager
Résultat DialogueManager

entities protected_oe property

protected Dictionary entities
Résultat Entity>.Dictionary

levelMap protected_oe property

protected Map levelMap
Résultat Map

levelNum protected_oe property

protected string levelNum
Résultat string

levelPlaying protected_oe property

protected bool levelPlaying
Résultat bool

levelStart protected_oe property

protected bool levelStart
Résultat bool

nextLevel protected_oe property

protected string nextLevel
Résultat string

questCreator protected_oe property

protected QuestCreator,PantheonPrototype questCreator
Résultat QuestCreator

removeList public_oe property

A list of entities to remove from the level entity list.
public List removeList
Résultat List

screenRect protected_oe property

protected Rectangle,Microsoft.Xna.Framework screenRect
Résultat Microsoft.Xna.Framework.Rectangle