C# Class Project290.Physics.Controllers.AbstractForceController

Inheritance: Controller
Afficher le fichier Open project: scastle/Solitude

Méthodes publiques

Свойство Type Description
DecayCurve Microsoft.Xna.Framework.Curve
ForceType ForceTypes
StrengthCurve Microsoft.Xna.Framework.Curve

Protected Properties

Свойство Type Description
Randomize System.Random

Méthodes publiques

Méthode Description
AbstractForceController ( ) : System

Constructor

AbstractForceController ( TimingModes mode ) : System

Overloaded Contstructor with supplying Timing Mode

ApplyForce ( float dt, float strength ) : void

Apply the force supplying strength (wich is modified in Update() according to the TimingMode

Trigger ( ) : void

Triggers the trigger modes (Trigger and Curve)

Update ( float dt ) : void

Inherited from Controller Depending on the TimingMode perform timing logic and call ApplyForce()

Méthodes protégées

Méthode Description
GetDecayMultiplier ( Body body ) : float

Calculate the Decay for a given body. Meant to ease force development and stick to the DRY principle and provide unified and predictable decay math.

Method Details

AbstractForceController() public méthode

Constructor
public AbstractForceController ( ) : System
Résultat System

AbstractForceController() public méthode

Overloaded Contstructor with supplying Timing Mode
public AbstractForceController ( TimingModes mode ) : System
mode TimingModes
Résultat System

ApplyForce() public abstract méthode

Apply the force supplying strength (wich is modified in Update() according to the TimingMode
public abstract ApplyForce ( float dt, float strength ) : void
dt float
strength float The strength
Résultat void

GetDecayMultiplier() protected méthode

Calculate the Decay for a given body. Meant to ease force development and stick to the DRY principle and provide unified and predictable decay math.
protected GetDecayMultiplier ( Body body ) : float
body Project290.Physics.Dynamics.Body The body to calculate decay for
Résultat float

Trigger() public méthode

Triggers the trigger modes (Trigger and Curve)
public Trigger ( ) : void
Résultat void

Update() public méthode

Inherited from Controller Depending on the TimingMode perform timing logic and call ApplyForce()
public Update ( float dt ) : void
dt float
Résultat void

Property Details

DecayCurve public_oe property

Curve to be used for Decay in Curve mode
public Curve,Microsoft.Xna.Framework DecayCurve
Résultat Microsoft.Xna.Framework.Curve

ForceType public_oe property

The Forcetype of the instance
public ForceTypes ForceType
Résultat ForceTypes

Randomize protected_oe property

Provided for reuse to provide Variation functionality in inheriting classes
protected Random,System Randomize
Résultat System.Random

StrengthCurve public_oe property

Curve used by Curve Mode as an animated multiplier for the force strength. Only positions between 0 and 1 are considered as that range is stretched to have ImpulseLength.
public Curve,Microsoft.Xna.Framework StrengthCurve
Résultat Microsoft.Xna.Framework.Curve