C# Класс Gruppe22.Client.GameWin

Handle all UI related operations of the game
Наследование: Microsoft.Xna.Framework.Game, Backend.IHandleEvent, IKeyHandler
Показать файл Открыть проект

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

Свойство Тип Описание
_graphics GraphicsDeviceManager

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

Метод Описание
GameWin ( ) : System

Constructor

HandleEvent ( bool DownStream, Backend eventID ) : void

Handle events from UIElements and/or backend objects

OnKeyDown ( Keys k ) : bool
OnKeyHeld ( Keys k ) : bool
OnKeyUp ( Keys k ) : bool
OnMouseDown ( int button ) : bool
OnMouseHeld ( int button ) : bool
OnMouseUp ( int button ) : bool
center ( Rectangle ViewPort, int width = 200, int height = 400, int top = -1 ) : Rectangle
inner ( Rectangle outer, int padding = 10 ) : Rectangle
wc_DownloadFileCompleted ( object sender, System e ) : void

Fired when a download is complete

wc_DownloadProgressChanged ( object sender, DownloadProgressChangedEventArgs e ) : void

Display download progress in the UI

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

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

This is called when the game should draw itself.

Initialize ( ) : void

Set up the (non visible) objects of the game

LoadContent ( ) : void

Cache Content

UnloadContent ( ) : void

Unload all managed content which has not been disposed of elsewhere

Update ( GameTime gameTime ) : void

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

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

Метод Описание
MediaPlayer_MediaStateChanged ( object sender, EventArgs e ) : void
SetupGame ( ) : void

Setup user interface

_AddHealth ( ) : void

Indicate health regained by potions

_AddMessage ( string s, object color = null ) : void

Add text to status box

_LoadFile ( string _filename, DownloadProgressChangedEventHandler progress, AsyncCompletedEventHandler finished ) : System.Threading.Tasks.Task

Download a file from the internet and place it in the local documents directory

_PlayMusic ( ) : void

Restart background music

_PlaySoundEffect ( Backend index ) : void

Play a sound effect

_RemoveHealth ( ) : void

Indicate damage done to player

_ShowAbout ( ) : void

Setup and display a window containing credits

_ShowCharacterWindow ( Backend actor, uint page ) : void
_ShowEndGame ( string message = "You have failed in your mission. Better luck next time.", string title = "Game over!" ) : void

A text displayed if the player died

_ShowFileDialog ( bool save ) : void

Setup and display a window used for saving / loading files

_ShowLANWindow ( NetPlayer network = null ) : void
_ShowMenu ( ) : void

Display Main Menu

_ShowShopWindow ( Backend actor1, Backend actor2 ) : void
_ShowTextBox ( string message ) : void

Display a dialog with Ok button

_screenshot ( ) : void

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

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

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

Constructor
public GameWin ( ) : System
Результат System

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

Handle events from UIElements and/or backend objects
public HandleEvent ( bool DownStream, Backend eventID ) : void
DownStream bool
eventID Backend
Результат void

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

Set up the (non visible) objects of the game
protected Initialize ( ) : void
Результат void

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

Cache Content
protected LoadContent ( ) : void
Результат void

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

public OnKeyDown ( Keys k ) : bool
k Keys
Результат bool

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

public OnKeyHeld ( Keys k ) : bool
k Keys
Результат bool

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

public OnKeyUp ( Keys k ) : bool
k Keys
Результат bool

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

public OnMouseDown ( int button ) : bool
button int
Результат bool

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

public OnMouseHeld ( int button ) : bool
button int
Результат bool

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

public OnMouseUp ( int button ) : bool
button int
Результат bool

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

Unload all managed content which has not been disposed of elsewhere
protected UnloadContent ( ) : 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

center() публичный статический Метод

public static center ( Rectangle ViewPort, int width = 200, int height = 400, int top = -1 ) : Rectangle
ViewPort Microsoft.Xna.Framework.Rectangle
width int
height int
top int
Результат Microsoft.Xna.Framework.Rectangle

inner() публичный статический Метод

public static inner ( Rectangle outer, int padding = 10 ) : Rectangle
outer Microsoft.Xna.Framework.Rectangle
padding int
Результат Microsoft.Xna.Framework.Rectangle

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

Fired when a download is complete
public wc_DownloadFileCompleted ( object sender, System e ) : void
sender object The source of the event
e System Event data
Результат void

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

Display download progress in the UI
public wc_DownloadProgressChanged ( object sender, DownloadProgressChangedEventArgs e ) : void
sender object The source of the event
e System.Net.DownloadProgressChangedEventArgs Event data
Результат void

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

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

Central Output device
protected GraphicsDeviceManager _graphics
Результат GraphicsDeviceManager