コード例 #1
0
        public MTBezierToState(MTBezierBy action, GameObject target)
            : base(action, target)
        {
            var config = BezierConfig;

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

            BezierConfig = config;
        }
コード例 #2
0
ファイル: MTBezierTo.cs プロジェクト: jyzgo/MTActionLib
        public MTBezierToState(MTBezierBy action, GameObject target)
            : base(action, target)
        {
            var config = BezierConfig;

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

            BezierConfig = config;
        }
コード例 #3
0
ファイル: MTBezierBy.cs プロジェクト: jyzgo/MTActionLib
        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;
        }
コード例 #4
0
        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);
        }
コード例 #5
0
ファイル: MTBezierBy.cs プロジェクト: jyzgo/MTActionLib
 public MTBezierByState(MTBezierBy action, GameObject target)
     : base(action, target)
 {
     BezierConfig = action.BezierConfig;
     PreviousPosition = StartPosition = target.transform.localPosition;
 }
コード例 #6
0
 public MTBezierByState(MTBezierBy action, GameObject target)
     : base(action, target)
 {
     BezierConfig     = action.BezierConfig;
     PreviousPosition = StartPosition = target.transform.localPosition;
 }