C# Class Bricklayer.Client.Game

The main game code
Inheritance: TomShane.Neoforce.Controls.Application
Afficher le fichier Open project: Cyral/Bricklayer Class Usage Examples

Méthodes publiques

Свойство Type Description
ContentPackData Bricklayer.Client.ContentPack
ContentPackIndex int
ContentPackName string
CurrentGameState GameState
DefaultFont Microsoft.Xna.Framework.Graphics.SpriteFont
Host string
Input InputHandler
IsMouseOnControl bool
MainWindow Bricklayer.Client.Interface.MainWindow
Map Bricklayer.Client.World.Map
MsgHandler Bricklayer.Client.Networking.MessageHandler
MyColor Color
MyHue int
MyID byte
MyIndex byte
NetManager Bricklayer.Client.Networking.NetworkManager
Port int
Random System.Random
Resolution Microsoft.Xna.Framework.Rectangle
TextureLoader Bricklayer.Client.TextureLoader
Username string

Méthodes publiques

Méthode Description
CheckControlPos ( Control c, Point pos ) : bool
CheckPosition ( Point pos ) : bool

Checks to see if the mouse is over a control (Mostly used for seeing if you can place a block there)

Exit ( ) : void
Game ( ) : System

Méthodes protégées

Méthode Description
CreateMainWindow ( ) : TomShane.Neoforce.Controls.Window

Creates a new instance of the main UI window

Draw ( GameTime gameTime ) : void

This is called when the game should draw itself.

DrawScene ( GameTime gameTime ) : void

Draws content behind the UI interface

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 ( ) : void

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

Update ( GameTime gameTime ) : void

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

Private Methods

Méthode Description
MainWindow_FocusGained ( object sender, TomShane e ) : void

Called when the MainWindow gains focus

Method Details

CheckControlPos() public méthode

public CheckControlPos ( Control c, Point pos ) : bool
c Control
pos Point
Résultat bool

CheckPosition() public méthode

Checks to see if the mouse is over a control (Mostly used for seeing if you can place a block there)
public CheckPosition ( Point pos ) : bool
pos Point
Résultat bool

CreateMainWindow() protected méthode

Creates a new instance of the main UI window
protected CreateMainWindow ( ) : TomShane.Neoforce.Controls.Window
Résultat TomShane.Neoforce.Controls.Window

Draw() protected méthode

This is called when the game should draw itself.
protected Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime Provides a snapshot of timing values.
Résultat void

DrawScene() protected méthode

Draws content behind the UI interface
protected DrawScene ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime Provides a snapshot of timing values.
Résultat void

Exit() public méthode

public Exit ( ) : void
Résultat void

Game() public méthode

public Game ( ) : System
Résultat System

Initialize() protected méthode

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.
protected Initialize ( ) : void
Résultat void

LoadContent() protected méthode

LoadContent will be called once per game and is the place to load all of your content.
protected LoadContent ( ) : void
Résultat void

Update() protected méthode

Allows the game to run logic such as updating the world, checking for collisions, gathering input, and playing audio.
protected Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime Provides a snapshot of timing values.
Résultat void

Property Details

ContentPackData public_oe static_oe property

public static ContentPack,Bricklayer.Client ContentPackData
Résultat Bricklayer.Client.ContentPack

ContentPackIndex public_oe static_oe property

public static int ContentPackIndex
Résultat int

ContentPackName public_oe static_oe property

public static string ContentPackName
Résultat string

CurrentGameState public_oe static_oe property

public static GameState CurrentGameState
Résultat GameState

DefaultFont public_oe static_oe property

public static SpriteFont,Microsoft.Xna.Framework.Graphics DefaultFont
Résultat Microsoft.Xna.Framework.Graphics.SpriteFont

Host public_oe static_oe property

public static string Host
Résultat string

Input public_oe static_oe property

public static InputHandler,Bricklayer.Client Input
Résultat InputHandler

IsMouseOnControl public_oe static_oe property

public static bool IsMouseOnControl
Résultat bool

MainWindow public_oe static_oe property

public static MainWindow,Bricklayer.Client.Interface MainWindow
Résultat Bricklayer.Client.Interface.MainWindow

Map public_oe static_oe property

public static Map,Bricklayer.Client.World Map
Résultat Bricklayer.Client.World.Map

MsgHandler public_oe static_oe property

public static MessageHandler,Bricklayer.Client.Networking MsgHandler
Résultat Bricklayer.Client.Networking.MessageHandler

MyColor public_oe static_oe property

public static Color MyColor
Résultat Color

MyHue public_oe static_oe property

public static int MyHue
Résultat int

MyID public_oe static_oe property

public static byte MyID
Résultat byte

MyIndex public_oe static_oe property

public static byte MyIndex
Résultat byte

NetManager public_oe static_oe property

public static NetworkManager,Bricklayer.Client.Networking NetManager
Résultat Bricklayer.Client.Networking.NetworkManager

Port public_oe static_oe property

public static int Port
Résultat int

Random public_oe static_oe property

public static Random,System Random
Résultat System.Random

Resolution public_oe static_oe property

public static Rectangle,Microsoft.Xna.Framework Resolution
Résultat Microsoft.Xna.Framework.Rectangle

TextureLoader public_oe static_oe property

public static TextureLoader,Bricklayer.Client TextureLoader
Résultat Bricklayer.Client.TextureLoader

Username public_oe static_oe property

public static string Username
Résultat string