Пример #1
0
        public CustomLayer(string Name, StickCustom custom, Canvas _Canvas)
        {
            name = Name;

            fig = custom;
            fig.parentLayer = this;

            theCanvas = _Canvas;
            tweenFig = new StickCustom(true);

            type = 4;

            firstKF = 0;
            lastKF = 19;

            keyFrames = new List<KeyFrame>();

            custObjectFrame first = new custObjectFrame(firstKF), last = new custObjectFrame(lastKF);

            foreach (StickJoint j in first.Joints)
                j.ParentFigure = fig;

            foreach (StickJoint j in last.Joints)
                j.ParentFigure = fig;

            keyFrames.Add(first);
            keyFrames.Add(last);
        }
Пример #2
0
        public StickLayer(string nom, StickFigure figure, Canvas aTheCanvas)
        {
            fig = figure;
            fig.parentLayer = this;

            //These are the default positions for keyframes.
            firstKF = 0;
            lastKF = 19;
            type = 1;

            keyFrames = new List<KeyFrame>();

            StickFrame first = new StickFrame(firstKF), last = new StickFrame(lastKF);

            foreach (StickJoint j in first.Joints)
                j.ParentFigure = fig;

            foreach (StickJoint j in last.Joints)
                j.ParentFigure = fig;

            keyFrames.Add(first);
            keyFrames.Add(last);

            theCanvas = aTheCanvas;

            tweenFig = new StickFigure(true, true);

            name = nom; //nomnomnom
        }
Пример #3
0
        public RectLayer(string Name, StickRect rect, Canvas _Canvas)
        {
            name = Name;

            fig = rect;
            fig.parentLayer = this;

            theCanvas = _Canvas;
            tweenFig = new StickRect(true);
            type = 3;

            firstKF = 0;
            lastKF = 19;

            keyFrames = new List<KeyFrame>();

            RectFrame first = new RectFrame(firstKF), last = new RectFrame(lastKF);

            foreach (StickJoint j in first.Joints)
                j.ParentFigure = fig;

            foreach (StickJoint j in last.Joints)
                j.ParentFigure = fig;

            keyFrames.Add(first);
            keyFrames.Add(last);
        }
Пример #4
0
        public PolyLayer(string Name, StickPoly custom, Canvas _Canvas, int jointCount)
        {
            this.jointCount = jointCount;

            name = Name;

            fig = custom;
            fig.parentLayer = this;

            theCanvas = _Canvas;
            tweenFig = new StickPoly(true, jointCount);

            type = 10;

            firstKF = 0;
            lastKF = 19;

            keyFrames = new List<KeyFrame>();

            PolyFrame first = new PolyFrame(firstKF, false, jointCount), last = new PolyFrame(lastKF, false, jointCount);

            foreach (StickJoint j in first.Joints)
                j.ParentFigure = fig;

            foreach (StickJoint j in last.Joints)
                j.ParentFigure = fig;

            keyFrames.Add(first);
            keyFrames.Add(last);
        }
Пример #5
0
        public LineLayer(string Name, StickLine Line, Canvas _Canvas)
        {
            name = Name;

            fig = Line;
            fig.parentLayer = this;

            theCanvas = _Canvas;
            tweenFig = new StickLine(true);
            type = 2;

            firstKF = 0;
            lastKF = 19;

            keyFrames = new List<KeyFrame>();

            LineFrame first = new LineFrame(firstKF), last = new LineFrame(lastKF);

            foreach (StickJoint j in first.Joints)
                j.ParentFigure = fig;

            foreach (StickJoint j in last.Joints)
                j.ParentFigure = fig;

            keyFrames.Add(first);
            keyFrames.Add(last);
        }
Пример #6
0
        public ImageLayer(string Name, StickImage rect, Canvas _Canvas, Bitmap img)
        {
            this.img = img;

            name = Name;

            fig = rect;
            fig.parentLayer = this;

            theCanvas = _Canvas;
            tweenFig = new StickImage(img, true);
            type = 7;

            firstKF = 0;
            lastKF = 19;

            keyFrames = new List<KeyFrame>();

            ImageFrame first = new ImageFrame(firstKF, img), last = new ImageFrame(lastKF, img);

            foreach (StickJoint j in first.Joints)
                j.ParentFigure = fig;

            foreach (StickJoint j in last.Joints)
                j.ParentFigure = fig;

            keyFrames.Add(first);
            keyFrames.Add(last);
        }