Пример #1
0
        public override float Execute(float input)
        {
            float acceleration = Calculate(position, velocity, input, time_type.GetDelta());

            velocity += acceleration * time_type.GetDelta();

            velocity = velocity
                       .GetTowards(0.0f, velocity * dampning * time_type.GetDelta())
                       .BindMagnitudeBelow(max_speed);

            position += velocity * time_type.GetDelta();
            return(position);
        }
Пример #2
0
        protected override bool UpdateFulfill()
        {
            float value;
            bool  result = GetMotionValue().GetMoveTowards(target, speed * time_type.GetDelta(), out value);

            ForceMotionValue(value);
            return(result);
        }
Пример #3
0
 protected override void UpdateInternal(float value)
 {
     targets.GetPercentCapped(value.ConvertFromOffsetToPercent())
     .IfNotNull(t => this.InterpolateSpacarPosition(
                    t.GetSpacarPosition(),
                    speed * time_type.GetDelta()
                    ));
 }
Пример #4
0
 protected override float UpdateMotionValue(float current, float target)
 {
     return(current.GetTowards(target, speed * time_type.GetDelta()));
 }
Пример #5
0
        public override float Execute(float input)
        {
            previous_output = previous_output.GetTowards(input, max_speed * time_type.GetDelta());

            return(previous_output);
        }
Пример #6
0
        public override float Execute(float input)
        {
            previous_output = previous_output.GetInterpolate(input, speed * time_type.GetDelta());

            return(previous_output);
        }
Пример #7
0
 protected override bool UpdateFulfill()
 {
     return(GetTarget().MoveTowardsLocalPlanarPosition(end, speed * time_type.GetDelta()));
 }