/// <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));
        }
Пример #2
0
		public Curve Clone()
		{
			Curve curve = new Curve();
			curve.preLoop = this.preLoop;
			curve.postLoop = this.postLoop;
			curve.keys = this.keys.Clone();
			return curve;
		}