public MTBezierToState(MTBezierBy action, GameObject target) : base(action, target) { var config = BezierConfig; config.ControlPoint1 -= StartPosition; config.ControlPoint2 -= StartPosition; config.EndPosition -= StartPosition; BezierConfig = config; }
public override MTFiniteTimeAction Reverse() { MTBezierConfig r; r.EndPosition = -BezierConfig.EndPosition; r.ControlPoint1 = BezierConfig.ControlPoint2 + -BezierConfig.EndPosition; r.ControlPoint2 = BezierConfig.ControlPoint1 + -BezierConfig.EndPosition; var action = new MTBezierBy (Duration, r); return action; }
public override MTFiniteTimeAction Reverse() { MTBezierConfig r; r.EndPosition = -BezierConfig.EndPosition; r.ControlPoint1 = BezierConfig.ControlPoint2 + -BezierConfig.EndPosition; r.ControlPoint2 = BezierConfig.ControlPoint1 + -BezierConfig.EndPosition; var action = new MTBezierBy(Duration, r); return(action); }
public MTBezierByState(MTBezierBy action, GameObject target) : base(action, target) { BezierConfig = action.BezierConfig; PreviousPosition = StartPosition = target.transform.localPosition; }