C# Class Vtj.Gaming.Scene

A game scene (level, screen...)
Inheritance: IDisposable
Datei anzeigen Open project: Ventajou/Space-Dinosaurs Class Usage Examples

Public Properties

Property Type Description
DeltaTime long
Down bool
Fire bool
Left bool
Right bool
Ticks long
Up bool

Protected Properties

Property Type Description
CanPause bool
CurrentGame Game
Overlay System.Html.Element
ShowWaitMessage bool

Public Methods

Method Description
AddSystem ( GameSystem gameSystem ) : void
Collision ( string mask1, string mask2, float x, float y ) : bool

Performs pixel level collision between two masks

Dispose ( ) : void
LoadAudio ( string url ) : AudioElement
LoadImage ( string url, bool createMask ) : ImageElement
RemoveSystem ( GameSystem gameSystem ) : void
Scene ( Game game ) : System
Start ( ) : void

Protected Methods

Method Description
HideMessage ( ) : void
Init ( ) : void
KeyDown ( System.Html.ElementEvent e ) : void
KeyUp ( System.Html.ElementEvent e ) : void
Pause ( ) : void
PauseScene ( ) : void
PreUpdate ( System.Html.Media.Graphics.CanvasContext2D context ) : void
Resume ( ) : void
ResumeScene ( ) : void
ShowMessage ( string text ) : void
Update ( System.Html.Media.Graphics.CanvasContext2D context ) : void
UpdateMessage ( string text ) : void

Private Methods

Method Description
DisposeSystems ( ) : void
HideWaitScreen ( ) : void
InitializeSystems ( ) : void
MaskedResourceLoaded ( System.Html.ElementEvent e ) : void
OnBlur ( System.Html.ElementEvent e ) : void
OnFocus ( System.Html.ElementEvent e ) : void
OnKeyDown ( System.Html.ElementEvent e ) : void
OnKeyUp ( System.Html.ElementEvent e ) : void
ResourceLoaded ( System.Html.ElementEvent e ) : void
StartTimer ( ) : void
StopTimer ( ) : void
TimerCallback ( ) : void

Method Details

AddSystem() public method

public AddSystem ( GameSystem gameSystem ) : void
gameSystem GameSystem
return void

Collision() public static method

Performs pixel level collision between two masks
public static Collision ( string mask1, string mask2, float x, float y ) : bool
mask1 string The mask1.
mask2 string The mask2.
x float The x.
y float The y.
return bool

Dispose() public method

public Dispose ( ) : void
return void

HideMessage() protected method

protected HideMessage ( ) : void
return void

Init() protected abstract method

protected abstract Init ( ) : void
return void

KeyDown() protected method

protected KeyDown ( System.Html.ElementEvent e ) : void
e System.Html.ElementEvent
return void

KeyUp() protected method

protected KeyUp ( System.Html.ElementEvent e ) : void
e System.Html.ElementEvent
return void

LoadAudio() public method

public LoadAudio ( string url ) : AudioElement
url string
return System.Html.AudioElement

LoadImage() public method

public LoadImage ( string url, bool createMask ) : ImageElement
url string
createMask bool
return System.Html.ImageElement

Pause() protected method

protected Pause ( ) : void
return void

PauseScene() protected method

protected PauseScene ( ) : void
return void

PreUpdate() protected method

protected PreUpdate ( System.Html.Media.Graphics.CanvasContext2D context ) : void
context System.Html.Media.Graphics.CanvasContext2D
return void

RemoveSystem() public method

public RemoveSystem ( GameSystem gameSystem ) : void
gameSystem GameSystem
return void

Resume() protected method

protected Resume ( ) : void
return void

ResumeScene() protected method

protected ResumeScene ( ) : void
return void

Scene() public method

public Scene ( Game game ) : System
game Game
return System

ShowMessage() protected method

protected ShowMessage ( string text ) : void
text string
return void

Start() public method

public Start ( ) : void
return void

Update() protected method

protected Update ( System.Html.Media.Graphics.CanvasContext2D context ) : void
context System.Html.Media.Graphics.CanvasContext2D
return void

UpdateMessage() protected method

protected UpdateMessage ( string text ) : void
text string
return void

Property Details

CanPause protected_oe property

protected bool CanPause
return bool

CurrentGame protected_oe property

protected Game,Vtj.Gaming CurrentGame
return Game

DeltaTime public_oe property

public long DeltaTime
return long

Down public_oe property

public bool Down
return bool

Fire public_oe property

public bool Fire
return bool

Left public_oe property

public bool Left
return bool

Overlay protected_oe property

protected Element,System.Html Overlay
return System.Html.Element

Right public_oe property

public bool Right
return bool

ShowWaitMessage protected_oe property

protected bool ShowWaitMessage
return bool

Ticks public_oe property

public long Ticks
return long

Up public_oe property

public bool Up
return bool