C# Class WebGame.Entity

Mostrar archivo Open project: AdmiralPotato/ggj2013

Public Properties

Property Type Description
Game Game
Sounds List
StarSystem StarSystem

Protected Properties

Property Type Description
parts double>.Dictionary

Private Properties

Property Type Description
ReceiveCommand void
SetupParts void

Public Methods

Method Description
ApplyAcceleration ( System.TimeSpan elapsed ) : void
ApplyEnergyForce ( double energy, double orientation ) : void
ApplyForce ( System.TimeSpan elapsed ) : double?

Meters Per Second Per Ton Applied in the direction of the Orientation Can be positive or negative

ApplyVelocity ( System.TimeSpan elapsed ) : void
Damage ( int damage, double orientation ) : void
DamagePart ( int damage, string part ) : void
Effective ( System.TimeSpan minimum, string partName ) : System.TimeSpan
Effective ( double maximum, string partName ) : double
Entity ( double mass, Vector3 position = null, Vector3 velocity = null ) : System
GetRandomWorkingPart ( ) : string
LoseEnergyFrom ( double intendedForce, System.TimeSpan elapsedTime ) : bool
PlaySound ( string name ) : void
SpendRawEnergy ( double amountToUse ) : bool
Update ( System.TimeSpan elapsed ) : void

Protected Methods

Method Description
CheckForCollisions ( Vector3 oldPosition ) : void
Destroy ( ) : void
HandleDamage ( int &damage, double orientation ) : void

Private Methods

Method Description
ReceiveCommand ( Ship ship, Command command ) : void
SetupParts ( ) : void

Method Details

ApplyAcceleration() public method

public ApplyAcceleration ( System.TimeSpan elapsed ) : void
elapsed System.TimeSpan
return void

ApplyEnergyForce() public method

public ApplyEnergyForce ( double energy, double orientation ) : void
energy double
orientation double
return void

ApplyForce() public method

Meters Per Second Per Ton Applied in the direction of the Orientation Can be positive or negative
public ApplyForce ( System.TimeSpan elapsed ) : double?
elapsed System.TimeSpan
return double?

ApplyVelocity() public method

public ApplyVelocity ( System.TimeSpan elapsed ) : void
elapsed System.TimeSpan
return void

CheckForCollisions() protected method

protected CheckForCollisions ( Vector3 oldPosition ) : void
oldPosition Vector3
return void

Damage() public method

public Damage ( int damage, double orientation ) : void
damage int
orientation double
return void

DamagePart() public method

public DamagePart ( int damage, string part ) : void
damage int
part string
return void

Destroy() protected method

protected Destroy ( ) : void
return void

Effective() public method

public Effective ( System.TimeSpan minimum, string partName ) : System.TimeSpan
minimum System.TimeSpan
partName string
return System.TimeSpan

Effective() public method

public Effective ( double maximum, string partName ) : double
maximum double
partName string
return double

Entity() public method

public Entity ( double mass, Vector3 position = null, Vector3 velocity = null ) : System
mass double
position Vector3
velocity Vector3
return System

GetRandomWorkingPart() public method

public GetRandomWorkingPart ( ) : string
return string

HandleDamage() protected method

protected HandleDamage ( int &damage, double orientation ) : void
damage int
orientation double
return void

LoseEnergyFrom() public method

public LoseEnergyFrom ( double intendedForce, System.TimeSpan elapsedTime ) : bool
intendedForce double
elapsedTime System.TimeSpan
return bool

PlaySound() public method

public PlaySound ( string name ) : void
name string
return void

SpendRawEnergy() public method

public SpendRawEnergy ( double amountToUse ) : bool
amountToUse double
return bool

Update() public method

public Update ( System.TimeSpan elapsed ) : void
elapsed System.TimeSpan
return void

Property Details

Game public_oe property

public Game Game
return Game

Sounds public_oe property

public List Sounds
return List

StarSystem public_oe property

public StarSystem,WebGame StarSystem
return StarSystem

parts protected_oe property

protected Dictionary parts
return double>.Dictionary