예제 #1
0
        public CollisionBox(float x, float y, float width, float height, float scale)
        {
            float scaledWidth  = (width * scale);
            float scaledHeight = (height * scale);

            _rectangle     = new Rectangle((int)(x), (int)(y), (int)(scaledWidth), (int)(scaledHeight));
            _primRectangle = new PrimRectangle(x, y, scaledWidth, scaledHeight);
        }
예제 #2
0
        public InventoryPanel(string id, int x, int y, int width, int height, Color color)
        {
            _id     = id;
            _x      = x;
            _y      = y;
            _width  = width;
            _height = height;

            _panel = PrimRectangle.Create(x, y, width, height, color);
        }
예제 #3
0
        public InfoPanel(string text, int x, int y, int width, int height, Color color, bool hasBorder)
        {
            _text   = text;
            _x      = x;
            _y      = y;
            _width  = width;
            _height = height;
            _color  = color;
            _panel  = PrimRectangle.Create(x, y, width, height, color);

            if (hasBorder)
            {
                _border = new PrimRectangle(x, y, width, height, Color.White, 1, 0, false);
            }
        }
예제 #4
0
 public CommonBar(int xPosition, int yPosition, int width, int height)
 {
     _frame   = new PrimRectangle((xPosition - FRAME_THICKNESS), (yPosition - FRAME_THICKNESS), (width + (FRAME_THICKNESS * 2)), (height + (FRAME_THICKNESS * 2)));
     _fillBar = new PrimRectangle((xPosition + 1), (yPosition + 1), (width - 2), (height - 2), true);
     _width   = width - 2;
 }
예제 #5
0
 public FillBar(int xPosition, int yPosition, int width, int height, Actor actor)
 {
     _bar   = new PrimRectangle(xPosition, yPosition, width, height, true);
     _width = width;
     _actor = actor;
 }