public JBezierToState(JBezierBy action, GameObject target) : base(action, target) { var config = BezierConfig; config.ControlPoint1 -= StartPosition; config.ControlPoint2 -= StartPosition; config.EndPosition -= StartPosition; BezierConfig = config; }
public override JFiniteTimeAction Reverse() { JBezierConfig r; r.EndPosition = -BezierConfig.EndPosition; r.ControlPoint1 = BezierConfig.ControlPoint2 + -BezierConfig.EndPosition; r.ControlPoint2 = BezierConfig.ControlPoint1 + -BezierConfig.EndPosition; var action = new JBezierBy(Duration, r); return(action); }
public JBezierByState(JBezierBy action, GameObject target) : base(action, target) { BezierConfig = action.BezierConfig; PreviousPosition = StartPosition = target.transform.localPosition; }