C# Класс ArcadeRPG.GameEngine

This is the GameEngine
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
currTime TimeSpan
gameEnded bool
hurt_time int
levelnum int
livesRemaining int

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

Метод Описание
Draw ( GameTime gameTime, SpriteBatch spriteBatch ) : void

This is called when the game should draw itself.

GameEngine ( ArcadeRPG.TimeExpired t, GameOver g ) : System
Initialize ( ) : void

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.

LoadContent ( Microsoft.Xna.Framework.Content.ContentManager Content ) : void

LoadContent will be called once per game and is the place to load all of your content.

LoadLevel ( int level_num ) : void
UnloadContent ( ) : void

UnloadContent will be called once per game and is the place to unload all content.

Update ( GameTime gameTime ) : void

Allows the game to run logic such as updating the world, checking for collisions, gathering input, and playing audio.

die ( ) : void
drawItems ( SpriteBatch sb, SpriteFont sf ) : void
hasMoreLives ( ) : Boolean
hasTimeLeft ( ) : bool
resetTimer ( ) : void
testAtExit ( int x, int y ) : bool

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

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

This is called when the game should draw itself.
public Draw ( GameTime gameTime, SpriteBatch spriteBatch ) : void
gameTime Microsoft.Xna.Framework.GameTime Provides a snapshot of timing values.
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
Результат void

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

public GameEngine ( ArcadeRPG.TimeExpired t, GameOver g ) : System
t ArcadeRPG.TimeExpired
g GameOver
Результат System

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

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.
public Initialize ( ) : void
Результат void

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

LoadContent will be called once per game and is the place to load all of your content.
public LoadContent ( Microsoft.Xna.Framework.Content.ContentManager Content ) : void
Content Microsoft.Xna.Framework.Content.ContentManager
Результат void

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

public LoadLevel ( int level_num ) : void
level_num int
Результат void

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

UnloadContent will be called once per game and is the place to unload all content.
public UnloadContent ( ) : void
Результат void

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

Allows the game to run logic such as updating the world, checking for collisions, gathering input, and playing audio.
public Update ( GameTime gameTime ) : void
gameTime GameTime Provides a snapshot of timing values.
Результат void

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

public die ( ) : void
Результат void

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

public drawItems ( SpriteBatch sb, SpriteFont sf ) : void
sb SpriteBatch
sf SpriteFont
Результат void

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

public hasMoreLives ( ) : Boolean
Результат Boolean

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

public hasTimeLeft ( ) : bool
Результат bool

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

public resetTimer ( ) : void
Результат void

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

public testAtExit ( int x, int y ) : bool
x int
y int
Результат bool

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

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

public TimeSpan currTime
Результат TimeSpan

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

public bool gameEnded
Результат bool

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

public int hurt_time
Результат int

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

public int levelnum
Результат int

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

public int livesRemaining
Результат int