/// <summary> /// Constructor /// </summary> public AbstractForceController() : base(ControllerType.AbstractForceController) { Enabled = true; Strength = 1.0f; Position = new Vector2(0, 0); MaximumSpeed = 100.0f; TimingMode = TimingModes.Switched; ImpulseTime = 0.0f; ImpulseLength = 1.0f; Triggered = false; StrengthCurve = new Curve(); Variation = 0.0f; Randomize = new Random(1234); DecayMode = DecayModes.None; DecayCurve = new Curve(); DecayStart = 0.0f; DecayEnd = 0.0f; StrengthCurve.Keys.Add(new CurveKey(0, 5)); StrengthCurve.Keys.Add(new CurveKey(0.1f, 5)); StrengthCurve.Keys.Add(new CurveKey(0.2f, -4)); StrengthCurve.Keys.Add(new CurveKey(1f, 0)); }
public Curve Clone() { Curve curve = new Curve(); curve.keys = keys.Clone(); curve.preLoop = preLoop; curve.postLoop = postLoop; return curve; }