C# Class WebGame.Ship

Inheritance: Entity
Datei anzeigen Open project: AdmiralPotato/ggj2013 Class Usage Examples

Public Properties

Property Type Description
LastBeamBanksUsed DateTime>.Dictionary
Players List
RepairCrewTargets List
missionState MissionStatus

Private Properties

Property Type Description
BeamDamage void
DetermineShieldFrom Shield
FireBeam void
SendUpdate void
SetCoolant void
SetPower void
SetupMissions void
TurnAngleNeededForDesiredOrientation double
UpdateMission void
UpdateOrientation void
UpdateProjectileLoading void
UpdateRepair void
UpdateShields void
UpdateTargetVelocity void

Public Methods

Method Description
AddPlayer ( Player player ) : void
ApplyForce ( System.TimeSpan elapsedTime ) : double?
BeamCoolDownTime ( int bank ) : double
Create ( ShipType type, Vector3 position = null ) : Ship
IsEntityCloserThan ( Entity target, float distance ) : bool
LaunchProjectile ( int tubeNumber, Entity target ) : Projectile
LoadProjectile ( int tubeNumber, ProjectileType type ) : bool
RemovePlayer ( Player player ) : void
SetRepairTarget ( string part, int repairCrewIndex = -1 ) : void
Ship ( ) : System
Ship ( Vector3 position ) : System
Ship ( double mass, Vector3 position = null ) : System
Update ( System.TimeSpan elapsed ) : void

Protected Methods

Method Description
HandleDamage ( int &damage, double orientation ) : void

Private Methods

Method Description
BeamDamage ( Entity target, double amount ) : void
DetermineShieldFrom ( double orientation ) : Shield
FireBeam ( int bank, Entity target, BeamType type ) : void
SendUpdate ( ) : void
SetCoolant ( string part, int amount ) : void
SetPower ( string part, float amount ) : void
SetupMissions ( ) : void
TurnAngleNeededForDesiredOrientation ( ) : double
UpdateMission ( ) : void
UpdateOrientation ( System.TimeSpan elapsed ) : void
UpdateProjectileLoading ( System.TimeSpan elapsed ) : void
UpdateRepair ( System.TimeSpan elapsed ) : void
UpdateShields ( System.TimeSpan elapsed ) : void
UpdateTargetVelocity ( System.TimeSpan elapsed ) : void

Method Details

AddPlayer() public method

public AddPlayer ( Player player ) : void
player Player
return void

ApplyForce() public method

public ApplyForce ( System.TimeSpan elapsedTime ) : double?
elapsedTime System.TimeSpan
return double?

BeamCoolDownTime() public method

public BeamCoolDownTime ( int bank ) : double
bank int
return double

Create() public static method

public static Create ( ShipType type, Vector3 position = null ) : Ship
type ShipType
position Vector3
return Ship

HandleDamage() protected method

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

IsEntityCloserThan() public method

public IsEntityCloserThan ( Entity target, float distance ) : bool
target Entity
distance float
return bool

LaunchProjectile() public method

public LaunchProjectile ( int tubeNumber, Entity target ) : Projectile
tubeNumber int
target Entity
return Projectile

LoadProjectile() public method

public LoadProjectile ( int tubeNumber, ProjectileType type ) : bool
tubeNumber int
type ProjectileType
return bool

RemovePlayer() public method

public RemovePlayer ( Player player ) : void
player Player
return void

SetRepairTarget() public method

public SetRepairTarget ( string part, int repairCrewIndex = -1 ) : void
part string
repairCrewIndex int
return void

Ship() public method

public Ship ( ) : System
return System

Ship() public method

public Ship ( Vector3 position ) : System
position Vector3
return System

Ship() public method

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

Update() public method

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

Property Details

LastBeamBanksUsed public_oe property

public Dictionary LastBeamBanksUsed
return DateTime>.Dictionary

Players public_oe property

public List Players
return List

RepairCrewTargets public_oe property

The string is the name of the system they are repairing
public List RepairCrewTargets
return List

missionState public_oe property

public MissionStatus,WebGame missionState
return MissionStatus