C# Класс Bricklayer.Client.Game

The main game code
Наследование: TomShane.Neoforce.Controls.Application
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
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

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

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

Защищенные методы

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

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

Метод Описание
MainWindow_FocusGained ( object sender, TomShane e ) : void

Called when the MainWindow gains focus

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

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

public CheckControlPos ( Control c, Point pos ) : bool
c Control
pos Point
Результат bool

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

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

CreateMainWindow() защищенный Метод

Creates a new instance of the main UI window
protected CreateMainWindow ( ) : TomShane.Neoforce.Controls.Window
Результат TomShane.Neoforce.Controls.Window

Draw() защищенный Метод

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

DrawScene() защищенный Метод

Draws content behind the UI interface
protected DrawScene ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime Provides a snapshot of timing values.
Результат void

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

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

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

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

LoadContent() защищенный Метод

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

Update() защищенный Метод

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

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

ContentPackData публичное статическое свойство

public static ContentPack,Bricklayer.Client ContentPackData
Результат Bricklayer.Client.ContentPack

ContentPackIndex публичное статическое свойство

public static int ContentPackIndex
Результат int

ContentPackName публичное статическое свойство

public static string ContentPackName
Результат string

CurrentGameState публичное статическое свойство

public static GameState CurrentGameState
Результат GameState

DefaultFont публичное статическое свойство

public static SpriteFont,Microsoft.Xna.Framework.Graphics DefaultFont
Результат Microsoft.Xna.Framework.Graphics.SpriteFont

Host публичное статическое свойство

public static string Host
Результат string

Input публичное статическое свойство

public static InputHandler,Bricklayer.Client Input
Результат InputHandler

IsMouseOnControl публичное статическое свойство

public static bool IsMouseOnControl
Результат bool

MainWindow публичное статическое свойство

public static MainWindow,Bricklayer.Client.Interface MainWindow
Результат Bricklayer.Client.Interface.MainWindow

Map публичное статическое свойство

public static Map,Bricklayer.Client.World Map
Результат Bricklayer.Client.World.Map

MsgHandler публичное статическое свойство

public static MessageHandler,Bricklayer.Client.Networking MsgHandler
Результат Bricklayer.Client.Networking.MessageHandler

MyColor публичное статическое свойство

public static Color MyColor
Результат Color

MyHue публичное статическое свойство

public static int MyHue
Результат int

MyID публичное статическое свойство

public static byte MyID
Результат byte

MyIndex публичное статическое свойство

public static byte MyIndex
Результат byte

NetManager публичное статическое свойство

public static NetworkManager,Bricklayer.Client.Networking NetManager
Результат Bricklayer.Client.Networking.NetworkManager

Port публичное статическое свойство

public static int Port
Результат int

Random публичное статическое свойство

public static Random,System Random
Результат System.Random

Resolution публичное статическое свойство

public static Rectangle,Microsoft.Xna.Framework Resolution
Результат Microsoft.Xna.Framework.Rectangle

TextureLoader публичное статическое свойство

public static TextureLoader,Bricklayer.Client TextureLoader
Результат Bricklayer.Client.TextureLoader

Username публичное статическое свойство

public static string Username
Результат string