Beispiel #1
0
        public JBezierToState(JBezierBy action, GameObject target)
            : base(action, target)
        {
            var config = BezierConfig;

            config.ControlPoint1 -= StartPosition;
            config.ControlPoint2 -= StartPosition;
            config.EndPosition   -= StartPosition;

            BezierConfig = config;
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 public JBezierByState(JBezierBy action, GameObject target)
     : base(action, target)
 {
     BezierConfig     = action.BezierConfig;
     PreviousPosition = StartPosition = target.transform.localPosition;
 }