Ejemplo n.º 1
0
        public DataAccess(GraphicsDevice graphicsDevice, SpriteBatch spriteBatch, Input input, StateManager stateManager, Keymap keymap, GuiThread guiThread, ContentHelper contentHelper)
        {
            this.graphicsDevice = graphicsDevice;
            this.spriteBatch = spriteBatch;
            this.input = input;
            this.stateManager = stateManager;
            this.keymap = keymap;
            this.guiThread = guiThread;
            this.contentHelper = contentHelper;

            random = new Random();
        }
Ejemplo n.º 2
0
        public void Update(Input input)
        {
            collage.AspectRatio = drawRectangle.AspectRatio;

            imageUnderMouse = null;
            for (int i = collage.Images.Count - 1; i >= 0; i--)
            {
                Rectangle rec = collage.Images[i].GetRectangleInBoundary(drawRectangle.Rectangle);
                if (Utils.IsVectorInRotatedRectangle(input.MousePositionVector, rec, collage.Images[i].Rotation))
                {
                    imageUnderMouse = collage.Images[i];
                    break;
                }
            }
        }