コード例 #1
0
        public override bool isObjectOnScreen(DevicePanel d, Classes.Scene.EditorEntity entity, int x, int y, int Transparency)
        {
            int type        = (int)entity.attributesMap["type"].ValueUInt8;
            int multiplierX = 0;
            int multiplierY = 0;

            switch (type)
            {
            case 0:
                multiplierX = 2;
                multiplierY = 128;
                break;

            case 1:
                multiplierX = 2;
                multiplierY = 2;
                break;

            case 2:
                multiplierX = 3;
                multiplierY = 3;
                break;
            }
            var widthPixels  = (int)(entity.attributesMap["radius"].ValueEnum) * multiplierX;
            var heightPixels = (int)(entity.attributesMap["height"].ValueEnum) * multiplierY;

            if (widthPixels != 0 && heightPixels != 0)
            {
                return(d.IsObjectOnScreen(x - widthPixels / 2, y - heightPixels / 2, widthPixels, heightPixels));
            }
            else
            {
                return(d.IsObjectOnScreen(x - 16, y - 16, 32, 32));
            }
        }
コード例 #2
0
        public override bool isObjectOnScreen(DevicePanel d, Classes.Scene.EditorEntity entity, int x, int y, int Transparency)
        {
            var  attribute   = entity.attributesMap["frameID"];
            int  angle       = (int)entity.attributesMap["angle"].ValueInt32;
            int  angleRotate = (int)entity.attributesMap["angle"].ValueInt32;
            int  type        = (int)entity.attributesMap["type"].ValueEnum;
            int  amplitudeX  = (int)entity.attributesMap["amplitude"].ValueVector2.X.High;
            int  amplitudeY  = (int)entity.attributesMap["amplitude"].ValueVector2.Y.High;
            int  childCount  = (int)entity.attributesMap["childCount"].ValueEnum;
            bool hasTension  = entity.attributesMap["hasTension"].ValueBool;

            int PlatformOffsetX = 0;
            int PlatformOffsetY = 0;
            int PlatformWidth   = 0;
            int PlatformHight   = 0;

            if (type == 0 || type == 1)
            {
                return(d.IsObjectOnScreen(x - PlatformOffsetX - PlatformWidth / 2, y - PlatformOffsetY - PlatformHight / 2, PlatformWidth, PlatformHight));
            }
            else
            {
                //Default Type
                return(d.IsObjectOnScreen(x - PlatformOffsetX - PlatformWidth / 2, y - PlatformOffsetY - PlatformHight / 2, PlatformWidth, PlatformHight));
            }
        }
コード例 #3
0
        public override bool isObjectOnScreen(DevicePanel d, Classes.Scene.EditorEntity entity, int x, int y, int Transparency)
        {
            var size   = (int)(entity.attributesMap["size"].ValueEnum);
            int bounds = (16 * size);

            return(d.IsObjectOnScreen(x - bounds, y - bounds, bounds * 2, bounds * 2));
        }
コード例 #4
0
        public override bool isObjectOnScreen(DevicePanel d, Classes.Scene.EditorEntity e, int x, int y, int Transparency)
        {
            var widthPixels  = (int)(e.attributesMap["size"].ValueVector2.X.High);
            var heightPixels = (int)(e.attributesMap["size"].ValueVector2.Y.High);

            return(d.IsObjectOnScreen(x - widthPixels / 2, y - heightPixels / 2, widthPixels, heightPixels));
        }
コード例 #5
0
        public static bool IsObjectOnScreen(DevicePanel d, Classes.Scene.EditorEntity _entity)
        {
            int x            = _entity.Position.X.High;
            int y            = _entity.Position.Y.High;
            int Transparency = (Methods.Solution.CurrentSolution.EditLayerA == null) ? 0xff : 0x32;

            if (!_entity.FilteredOut)
            {
                if (_entity.CurrentRender == null)
                {
                    var RenderDrawing = EntityRenderers.Where(t => t.GetObjectName() == _entity.Object.Name.Name).FirstOrDefault();
                    _entity.CurrentRender = RenderDrawing;
                }
                if (_entity.CurrentRender != null)
                {
                    return(_entity.CurrentRender.isObjectOnScreen(d, _entity, x, y, Transparency));
                }
                else
                {
                    return(d.IsObjectOnScreen(x, y, 20, 20));
                }
            }
            else
            {
                return(false);
            }
        }
コード例 #6
0
        public override bool isObjectOnScreen(DevicePanel d, Classes.Scene.EditorEntity e, int x, int y, int Transparency)
        {
            var widthPixels  = (int)(13) * 16;
            var heightPixels = (int)(e.attributesMap["size"].ValueEnum * 2 - 1) * 16;

            return(d.IsObjectOnScreen(x - widthPixels / 2, y - heightPixels / 2, widthPixels + 15, heightPixels + 15));
        }
コード例 #7
0
        public override bool isObjectOnScreen(DevicePanel d, Classes.Scene.EditorEntity entity, int x, int y, int Transparency)
        {
            int length = (int)entity.attributesMap["length"].ValueUInt8 + 1;
            int gap    = (int)entity.attributesMap["gap"].ValueUInt8;
            int bounds = (48 * length + gap);

            return(d.IsObjectOnScreen(x - bounds / 2, y - bounds / 2, bounds, bounds));
        }
コード例 #8
0
        public override bool isObjectOnScreen(DevicePanel d, Classes.Scene.EditorEntity entity, int x, int y, int Transparency)
        {
            var length       = entity.attributesMap["length"].ValueUInt8;
            int widthPixels  = length * 16;
            int heightPixels = 16;

            return(d.IsObjectOnScreen(x - widthPixels / 2, y - heightPixels / 2, widthPixels + 15, heightPixels));
        }
コード例 #9
0
        public override bool isObjectOnScreen(DevicePanel d, EditorEntity entity, int x, int y, int Transparency)
        {
            //TODO: Validate
            int size       = (int)entity.attributesMap["size"].ValueUInt16;
            int realHeight = size * 16;
            int y_offset   = (realHeight != 0 ? (realHeight / 2) : 0);

            return(d.IsObjectOnScreen(x - 20, y - y_offset, 40, realHeight));
        }
コード例 #10
0
        public override bool isObjectOnScreen(DevicePanel d, Classes.Scene.EditorEntity entity, int x, int y, int Transparency)
        {
            var width        = (int)(entity.attributesMap["width"].ValueUInt8);
            var height       = (int)(entity.attributesMap["height"].ValueUInt8);
            int widthPixels  = width * 16;
            int heightPixels = height * 16;

            return(d.IsObjectOnScreen(x - 8 - widthPixels / 2, y - 8 - heightPixels / 2, widthPixels + 8, heightPixels + 8));
        }
コード例 #11
0
        public override bool isObjectOnScreen(DevicePanel d, Classes.Scene.EditorEntity entity, int x, int y, int Transparency)
        {
            int width  = (int)entity.attributesMap["size"].ValueVector2.X.High;
            int height = (int)entity.attributesMap["size"].ValueVector2.Y.High;

            int boundsX = width;
            int boundsY = height;

            return(d.IsObjectOnScreen(x, y, boundsX, boundsY));
        }
コード例 #12
0
        public override bool isObjectOnScreen(DevicePanel d, Classes.Scene.EditorEntity entity, int x, int y, int Transparency)
        {
            //TO-DO: Improve
            int type   = (int)entity.attributesMap["type"].ValueUInt8;
            int height = (int)entity.attributesMap["height"].ValueUInt8;

            int boundsX = 256;
            int boundsY = 160 * height + 96;

            return(d.IsObjectOnScreen(x - boundsX * height, y - boundsY * height, boundsX * height, boundsY * height));
        }
コード例 #13
0
        public override bool isObjectOnScreen(DevicePanel d, Classes.Scene.EditorEntity entity, int x, int y, int Transparency)
        {
            var widthPixels  = (int)(entity.attributesMap["detectSize"].ValueVector2.X.High - 1) / 16;
            var heightPixels = (int)(entity.attributesMap["detectSize"].ValueVector2.Y.High - 1) / 16;
            var offsetX      = (int)(entity.attributesMap["detectOffset"].ValueVector2.X.High - 1) / 16;
            var offsetY      = (int)(entity.attributesMap["detectOffset"].ValueVector2.Y.High - 1) / 16;

            x += offsetX;
            y += offsetY;
            return(d.IsObjectOnScreen(x - widthPixels / 2, y - heightPixels / 2, widthPixels + 15, heightPixels + 15));
        }
コード例 #14
0
        public override bool isObjectOnScreen(DevicePanel d, Classes.Scene.EditorEntity entity, int x, int y, int Transparency)
        {
            var value = entity.attributesMap["type"];
            int count = (entity.attributesMap.ContainsKey("count") ? (int)entity.attributesMap["count"].ValueUInt8 : 0);

            if (count == 0)
            {
                count = 1;
            }
            int bounds = (32 * count);

            return(d.IsObjectOnScreen(x - bounds / 2, y - bounds / 2, bounds, bounds));
        }
コード例 #15
0
 public virtual bool isObjectOnScreen(DevicePanel d, EditorEntity entity, int x, int y, int Transparency)
 {
     return(d.IsObjectOnScreen(x, y, 20, 20));
 }
コード例 #16
0
        public override bool isObjectOnScreen(DevicePanel d, Classes.Scene.EditorEntity entity, int x, int y, int Transparency)
        {
            int type         = (int)entity.attributesMap["type"].ValueUInt8;
            int multiplierX  = 0;
            int multiplierY  = 0;
            int widthPixels  = 0;
            int heightPixels = 0;

            switch (type)
            {
            case 0:
                multiplierX  = 2;
                multiplierY  = 2;
                widthPixels  = (int)(entity.attributesMap["length"].ValueEnum) * multiplierX;
                heightPixels = (int)(entity.attributesMap["radius"].ValueEnum) * multiplierY;
                break;

            case 1:
                multiplierX  = 2;
                multiplierY  = 2;
                widthPixels  = (int)(entity.attributesMap["radius"].ValueEnum) * multiplierX;
                heightPixels = (int)(entity.attributesMap["length"].ValueEnum) * multiplierY;
                break;

            case 2:
                multiplierX  = 2;
                multiplierY  = 2;
                widthPixels  = (int)(entity.attributesMap["radius"].ValueEnum) * multiplierX;
                heightPixels = (int)(entity.attributesMap["length"].ValueEnum) * multiplierY;
                break;

            case 3:     //Reverse Direction of 3
                multiplierX  = 2;
                multiplierY  = 2;
                widthPixels  = (int)(entity.attributesMap["radius"].ValueEnum) * multiplierX;
                heightPixels = (int)(entity.attributesMap["length"].ValueEnum) * multiplierY;
                break;

            case 4:
                multiplierX  = 2;
                multiplierY  = 2;
                widthPixels  = (int)(entity.attributesMap["length"].ValueEnum) * multiplierX;
                heightPixels = (int)(entity.attributesMap["radius"].ValueEnum) * multiplierY;
                break;

            case 5:     // Nothing Apparently
                widthPixels  = (int)(entity.attributesMap["length"].ValueEnum) * multiplierX;
                heightPixels = (int)(entity.attributesMap["radius"].ValueEnum) * multiplierY;
                break;

            case 6:     // Nothing Apparently
                widthPixels  = (int)(entity.attributesMap["length"].ValueEnum) * multiplierX;
                heightPixels = (int)(entity.attributesMap["radius"].ValueEnum) * multiplierY;
                break;

            case 7:
                multiplierX  = 2;
                multiplierY  = 2;
                widthPixels  = (int)(entity.attributesMap["radius"].ValueEnum) * multiplierX;
                heightPixels = (int)(entity.attributesMap["length"].ValueEnum) * multiplierY;
                break;
            }
            if (widthPixels != 0 && heightPixels != 0)
            {
                return(d.IsObjectOnScreen(x - widthPixels / 2, y - heightPixels / 2, widthPixels, heightPixels));
            }
            else
            {
                return(d.IsObjectOnScreen(x - 16, y - 16, 32, 32));
            }
        }
コード例 #17
0
 public override bool isObjectOnScreen(DevicePanel d, Classes.Scene.EditorEntity e, int x, int y, int Transparency)
 {
     return(d.IsObjectOnScreen(x, y, 20, 20));
 }
コード例 #18
0
        public override bool isObjectOnScreen(DevicePanel d, Classes.Scene.EditorEntity entity, int x, int y, int Transparency)
        {
            int bounds = 330;

            return(d.IsObjectOnScreen(x - bounds / 2, y - bounds / 2, bounds, bounds));
        }