Esempio n. 1
0
        public override void Draw(Structures.EntityRenderProp properties)
        {
            Methods.Draw.GraphicsHandler d = properties.Graphics;
            SceneEntity entity             = properties.Object;

            Classes.Scene.Sets.EditorEntity e = properties.EditorObject;
            int x                  = properties.X;
            int y                  = properties.Y;
            int Transparency       = properties.Transparency;
            int index              = properties.Index;
            int previousChildCount = properties.PreviousChildCount;
            int platformAngle      = properties.PlatformAngle;

            Methods.Entities.EntityAnimator Animation = properties.Animations;
            bool selected    = properties.isSelected;
            bool fliph       = false;
            bool flipv       = false;
            var  editorAnim  = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("AIZTornado", d.DevicePanel, 0, 0, fliph, flipv, false);
            var  editorAnim2 = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("AIZTornado", d.DevicePanel, 1, -1, fliph, flipv, false);
            var  editorAnim3 = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("AIZTornado", d.DevicePanel, 2, -1, fliph, flipv, false);

            if (editorAnim != null && editorAnim.Frames.Count != 0 && editorAnim2 != null && editorAnim2.Frames.Count != 0 && editorAnim3 != null && editorAnim3.Frames.Count != 0)
            {
                var frame  = editorAnim.Frames[0];
                var frame2 = editorAnim2.Frames[Animation.index];
                var frame3 = editorAnim3.Frames[Animation.index];


                Animation.ProcessAnimation(frame2.Entry.SpeedMultiplyer, frame2.Entry.Frames.Count, frame2.Frame.Delay);
                Animation.ProcessAnimation2(frame3.Entry.SpeedMultiplyer, frame3.Entry.Frames.Count, frame3.Frame.Delay);

                d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frame3),
                             x + frame3.Frame.PivotX,
                             y + frame3.Frame.PivotY,
                             frame3.Frame.Width, frame3.Frame.Height, false, Transparency);
                d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frame),
                             x + frame.Frame.PivotX,
                             y + frame.Frame.PivotY,
                             frame.Frame.Width, frame.Frame.Height, false, Transparency);
                d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frame2),
                             x + frame2.Frame.PivotX,
                             y + frame2.Frame.PivotY,
                             frame2.Frame.Width, frame2.Frame.Height, false, Transparency);
            }
        }
Esempio n. 2
0
        public override void Draw(Structures.EntityRenderProp properties)
        {
            Methods.Draw.GraphicsHandler d = properties.Graphics;
            SceneEntity entity             = properties.Object;

            Classes.Scene.Sets.EditorEntity e = properties.EditorObject;
            int x                  = properties.X;
            int y                  = properties.Y;
            int Transparency       = properties.Transparency;
            int index              = properties.Index;
            int previousChildCount = properties.PreviousChildCount;
            int platformAngle      = properties.PlatformAngle;

            Methods.Entities.EntityAnimator Animation = properties.Animations;
            bool selected  = properties.isSelected;
            bool fliph     = false;
            bool flipv     = false;
            int  type      = (int)entity.attributesMap["type"].ValueUInt8;
            int  blockID   = 0;
            int  randomNum = entity.SlotID % 3;

            switch (type)
            {
            case 4:
                blockID = randomNum;
                break;

            case 5:

                blockID = randomNum + 3;
                break;
            }
            var editorAnim     = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("LaundroMobile", d.DevicePanel, 0, 0, fliph, flipv, false);
            var editorAnim2    = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("LaundroMobile", d.DevicePanel, 9, blockID, fliph, flipv, false);
            var editorAnim3    = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("LaundroMobile", d.DevicePanel, 1, -1, fliph, flipv, false);
            var editorAnim4    = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("LaundroMobile", d.DevicePanel, 3, -1, fliph, flipv, false);
            var editorAnim5    = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("LaundroMobile", d.DevicePanel, 8, -1, fliph, flipv, false);
            var editorAnim6    = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("LaundroMobile", d.DevicePanel, 2, -1, fliph, flipv, false);
            var editorAnim7    = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("LaundroMobile", d.DevicePanel, 0, 3, fliph, flipv, false);
            var editorAnim8    = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("LaundroMobile", d.DevicePanel, 0, 2, fliph, flipv, false);
            var editorAnim9    = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("LaundroMobile", d.DevicePanel, 0, 4, fliph, flipv, false);
            var editorAnimIcon = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("EditorIcons2", d.DevicePanel, 0, 14, false, false, false);

            if (editorAnim != null && editorAnim.Frames.Count != 0 && editorAnim2 != null && editorAnim2.Frames.Count != 0 && editorAnim3 != null && editorAnim3.Frames.Count != 0 && editorAnim4 != null && editorAnim4.Frames.Count != 0 && editorAnim5 != null && editorAnim5.Frames.Count != 0 && editorAnim6 != null && editorAnim6.Frames.Count != 0 && editorAnim7 != null && editorAnim7.Frames.Count != 0 && editorAnim8 != null && editorAnim8.Frames.Count != 0 && editorAnim9 != null && editorAnim9.Frames.Count != 0)
            {
                var frame                    = editorAnim.Frames[0];
                var frameBlock               = editorAnim2.Frames[0];
                var frameLaundry             = editorAnim3.Frames[Animation.index];
                var framePropel              = editorAnim4.Frames[Animation.index];
                var frameBomb                = editorAnim5.Frames[Animation.index2];
                var frameLaundryCenter       = editorAnim6.Frames[Animation.index];
                var frameLaundryCenterBottom = editorAnim7.Frames[0];
                var frameLaundryCenterTop    = editorAnim8.Frames[0];
                var frameRockets             = editorAnim9.Frames[0];


                if (type == 0)
                {
                    Animation.ProcessAnimation(framePropel.Entry.SpeedMultiplyer, framePropel.Entry.Frames.Count, framePropel.Frame.Delay);
                    d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frameRockets),
                                 x + frameRockets.Frame.PivotX - 4,
                                 y + frameRockets.Frame.PivotY - 27,
                                 frameRockets.Frame.Width, frameRockets.Frame.Height, false, Transparency);
                    d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frame),
                                 x + frame.Frame.PivotX,
                                 y + frame.Frame.PivotY,
                                 frame.Frame.Width, frame.Frame.Height, false, Transparency);
                    d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(framePropel),
                                 x + framePropel.Frame.PivotX,
                                 y + framePropel.Frame.PivotY,
                                 framePropel.Frame.Width, framePropel.Frame.Height, false, Transparency);
                    d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frameRockets),
                                 x + frameRockets.Frame.PivotX - 18,
                                 y + frameRockets.Frame.PivotY + 20,
                                 frameRockets.Frame.Width, frameRockets.Frame.Height, false, Transparency);
                    d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frameRockets),
                                 x + frameRockets.Frame.PivotX - 18,
                                 y + frameRockets.Frame.PivotY - 27,
                                 frameRockets.Frame.Width, frameRockets.Frame.Height, false, Transparency);
                }
                else if (type == 1)
                {
                    Animation.ProcessAnimation3(frameBomb.Entry.SpeedMultiplyer, frameBomb.Entry.Frames.Count, frameBomb.Frame.Delay);
                    d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frameBomb),
                                 x + frameBomb.Frame.PivotX,
                                 y + frameBomb.Frame.PivotY,
                                 frameBomb.Frame.Width, frameBomb.Frame.Height, false, Transparency);
                }
                else if (type == 2)
                {
                    Animation.ProcessAnimation2(frameLaundry.Entry.SpeedMultiplyer, frameLaundry.Entry.Frames.Count, frameLaundry.Frame.Delay);
                    d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frameLaundry),
                                 x + frameLaundry.Frame.PivotX,
                                 y + frameLaundry.Frame.PivotY + 16,
                                 frameLaundry.Frame.Width, frameLaundry.Frame.Height, false, Transparency);
                    d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frameLaundry),
                                 x + frameLaundry.Frame.PivotX,
                                 y + frameLaundry.Frame.PivotY + frameLaundry.Frame.PivotY + 16,
                                 frameLaundry.Frame.Width, frameLaundry.Frame.Height, false, Transparency);
                    d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frameLaundry),
                                 x + frameLaundry.Frame.PivotX,
                                 y + frameLaundry.Frame.PivotY + -(frameLaundry.Frame.PivotY * 2) + 16,
                                 frameLaundry.Frame.Width, frameLaundry.Frame.Height, false, Transparency);
                    d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frameLaundry),
                                 x + frameLaundry.Frame.PivotX,
                                 y - frameLaundry.Frame.PivotY + -(frameLaundry.Frame.PivotY * 2) + 16,
                                 frameLaundry.Frame.Width, frameLaundry.Frame.Height, false, Transparency);

                    d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frameLaundryCenterBottom),
                                 x + frameLaundryCenterBottom.Frame.PivotX,
                                 y + frameLaundryCenterBottom.Frame.PivotY + frameLaundryCenterBottom.Frame.PivotY * 3 + 16,
                                 frameLaundryCenterBottom.Frame.Width, frameLaundryCenterBottom.Frame.Height, false, Transparency);

                    d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frameLaundryCenterTop),
                                 x + frameLaundryCenterTop.Frame.PivotX,
                                 y + frameLaundryCenterTop.Frame.PivotY,
                                 frameLaundryCenterTop.Frame.Width, frameLaundryCenterTop.Frame.Height, false, Transparency);

                    d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frameLaundryCenter),
                                 x + frameLaundryCenter.Frame.PivotX,
                                 y + frameLaundryCenter.Frame.PivotY + frameLaundryCenter.Frame.PivotY * 2 + 16,
                                 frameLaundryCenter.Frame.Width, frameLaundryCenter.Frame.Height, false, Transparency);
                }
                else if (type == 4 || type == 5)
                {
                    d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frameBlock),
                                 x + frameBlock.Frame.PivotX,
                                 y + frameBlock.Frame.PivotY,
                                 frameBlock.Frame.Width, frameBlock.Frame.Height, false, Transparency);
                }
                else
                {
                    if (editorAnimIcon != null && editorAnimIcon.Frames.Count != 0)
                    {
                        var frameIcon = editorAnimIcon.Frames[0];
                        d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frameIcon), x + frameIcon.Frame.PivotX, y + frameIcon.Frame.PivotY,
                                     frameIcon.Frame.Width, frameIcon.Frame.Height, false, Transparency);
                    }
                }
            }
        }
        public override void Draw(Structures.EntityRenderProp properties)
        {
            Methods.Draw.GraphicsHandler d = properties.Graphics;
            SceneEntity entity             = properties.Object;

            Classes.Scene.Sets.EditorEntity e = properties.EditorObject;
            int x                  = properties.X;
            int y                  = properties.Y;
            int Transparency       = properties.Transparency;
            int index              = properties.Index;
            int previousChildCount = properties.PreviousChildCount;
            int platformAngle      = properties.PlatformAngle;

            Methods.Entities.EntityAnimator Animation = properties.Animations;
            bool selected     = properties.isSelected;
            bool fliph        = false;
            bool flipv        = false;
            var  editorAnim   = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("Train", d.DevicePanel, 0, -1, fliph, flipv, false);
            var  editorAnim2  = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("Train", d.DevicePanel, 1, -1, fliph, flipv, false);
            var  editorAnim3  = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("Train", d.DevicePanel, 2, -1, fliph, flipv, false);
            var  editorAnim4  = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("Train", d.DevicePanel, 5, 0, false, false, false);
            var  editorAnim5  = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("Train", d.DevicePanel, 7, -1, fliph, flipv, false);
            var  editorAnim6  = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("Train", d.DevicePanel, 6, 0, false, false, false);
            var  editorAnim7  = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("Train", d.DevicePanel, 3, -1, fliph, flipv, false);
            var  editorAnim8  = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("Train", d.DevicePanel, 4, -1, fliph, flipv, false);
            var  editorAnim9  = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("Train", d.DevicePanel, 10, -1, fliph, flipv, false);
            var  editorAnim10 = Controls.Editor.MainEditor.Instance.EntityDrawing.LoadAnimation2("Train", d.DevicePanel, 12, 0, fliph, flipv, false);

            if (editorAnim != null && editorAnim.Frames.Count != 0 && editorAnim2 != null && editorAnim2.Frames.Count != 0 && editorAnim3 != null && editorAnim3.Frames.Count != 0 && editorAnim4 != null && editorAnim4.Frames.Count != 0 && editorAnim5 != null && editorAnim5.Frames.Count != 0 && editorAnim6 != null && editorAnim6.Frames.Count != 0 && editorAnim7 != null && editorAnim7.Frames.Count != 0 && editorAnim8 != null && editorAnim8.Frames.Count != 0 && editorAnim9 != null && editorAnim9.Frames.Count != 0 && editorAnim10 != null && editorAnim10.Frames.Count != 0)
            {
                var frame   = editorAnim.Frames[0];
                var frame2  = editorAnim2.Frames[0];
                var frame3  = editorAnim2.Frames[1];
                var frame4  = editorAnim3.Frames[Animation.index2];
                var frame5  = editorAnim4.Frames[0];
                var frame6  = editorAnim5.Frames[Animation.index];
                var frame7  = editorAnim6.Frames[0];
                var frame8  = editorAnim7.Frames[0];
                var frame9  = editorAnim7.Frames[1];
                var frame10 = editorAnim8.Frames[0];
                var frame11 = editorAnim8.Frames[1];
                var frame12 = editorAnim9.Frames[Animation.index3];
                var frame13 = editorAnim10.Frames[0];

                Animation.ProcessAnimation(frame6.Entry.SpeedMultiplyer, frame6.Entry.Frames.Count, frame6.Frame.Delay);
                Animation.ProcessAnimation2(frame4.Entry.SpeedMultiplyer, frame4.Entry.Frames.Count, frame4.Frame.Delay);
                Animation.ProcessAnimation3(frame12.Entry.SpeedMultiplyer, frame12.Entry.Frames.Count, frame12.Frame.Delay);

                //Eggman
                d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frame12),
                             x + frame12.Frame.PivotX,
                             y + frame12.Frame.PivotY,
                             frame12.Frame.Width, frame12.Frame.Height, false, Transparency);
                d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frame13),
                             x + frame13.Frame.PivotX,
                             y + frame13.Frame.PivotY,
                             frame13.Frame.Width, frame13.Frame.Height, false, Transparency);

                d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frame),
                             x + frame.Frame.PivotX,
                             y + frame.Frame.PivotY,
                             frame.Frame.Width, frame.Frame.Height, false, Transparency);

                d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frame2),
                             x + frame2.Frame.PivotX - 104,
                             y + frame2.Frame.PivotY + 56,
                             frame2.Frame.Width, frame2.Frame.Height, false, Transparency);
                d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frame2),
                             x + frame2.Frame.PivotX - 30,
                             y + frame2.Frame.PivotY + 56,
                             frame2.Frame.Width, frame2.Frame.Height, false, Transparency);

                d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frame3),
                             x + frame3.Frame.PivotX - 104,
                             y + frame3.Frame.PivotY + 56,
                             frame3.Frame.Width, frame3.Frame.Height, false, Transparency);
                d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frame3),
                             x + frame3.Frame.PivotX - 30,
                             y + frame3.Frame.PivotY + 56,
                             frame3.Frame.Width, frame3.Frame.Height, false, Transparency);

                d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frame4),
                             x + frame4.Frame.PivotX + 22,
                             y + frame4.Frame.PivotY + 74,
                             frame4.Frame.Width, frame4.Frame.Height, false, Transparency);
                d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frame4),
                             x + frame4.Frame.PivotX + 84,
                             y + frame4.Frame.PivotY + 74,
                             frame4.Frame.Width, frame4.Frame.Height, false, Transparency);

                d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frame5),
                             x + frame5.Frame.PivotX,
                             y + frame5.Frame.PivotY,
                             frame5.Frame.Width, frame5.Frame.Height, false, Transparency);
                d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frame6),
                             x + frame6.Frame.PivotX,
                             y + frame6.Frame.PivotY,
                             frame6.Frame.Width, frame6.Frame.Height, false, Transparency);
                d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frame7),
                             x + frame7.Frame.PivotX,
                             y + frame7.Frame.PivotY,
                             frame7.Frame.Width, frame7.Frame.Height, false, Transparency);

                d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frame9),
                             x + frame9.Frame.PivotX - 46,
                             y + frame9.Frame.PivotY + 54,
                             frame9.Frame.Width, frame9.Frame.Height, false, Transparency);
                d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frame8),
                             x + frame8.Frame.PivotX - 122,
                             y + frame8.Frame.PivotY + 54,
                             frame8.Frame.Width, frame8.Frame.Height, false, Transparency);

                d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frame10),
                             x + frame10.Frame.PivotX + 7,
                             y + frame10.Frame.PivotY,
                             frame10.Frame.Width, frame10.Frame.Height, false, Transparency);
                d.DrawBitmap(new Methods.Draw.GraphicsHandler.GraphicsInfo(frame11),
                             x + frame11.Frame.PivotX,
                             y + frame11.Frame.PivotY,
                             frame11.Frame.Width, frame11.Frame.Height, false, Transparency);
            }
        }