C# Класс 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.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Camera Camera
addList Entity>.Dictionary
removeList List

Защищенные свойства (Protected)

Свойство Тип Описание
dialogueManager DialogueManager
entities Entity>.Dictionary
levelMap Map
levelNum string
levelPlaying bool
levelStart bool
nextLevel string
questCreator QuestCreator
screenRect Microsoft.Xna.Framework.Rectangle

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

Draw() публичный Метод

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
Результат void

Level() публичный Метод

The constructor for the Level class. Basically doesn't do anything important at this point.
public Level ( GraphicsDevice graphicsDevice ) : System
graphicsDevice GraphicsDevice
Результат System

Load() публичный Метод

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
Результат void

Update() публичный Метод

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
Результат void

Описание свойств

Camera публичное свойство

public Camera,PantheonPrototype Camera
Результат Camera

addList публичное свойство

A list of entities to add to the level entity list.
public Dictionary addList
Результат Entity>.Dictionary

dialogueManager защищенное свойство

protected DialogueManager,PantheonPrototype dialogueManager
Результат DialogueManager

entities защищенное свойство

protected Dictionary entities
Результат Entity>.Dictionary

levelMap защищенное свойство

protected Map levelMap
Результат Map

levelNum защищенное свойство

protected string levelNum
Результат string

levelPlaying защищенное свойство

protected bool levelPlaying
Результат bool

levelStart защищенное свойство

protected bool levelStart
Результат bool

nextLevel защищенное свойство

protected string nextLevel
Результат string

questCreator защищенное свойство

protected QuestCreator,PantheonPrototype questCreator
Результат QuestCreator

removeList публичное свойство

A list of entities to remove from the level entity list.
public List removeList
Результат List

screenRect защищенное свойство

protected Rectangle,Microsoft.Xna.Framework screenRect
Результат Microsoft.Xna.Framework.Rectangle