CGPoint velocity = leftJoystick.velocity;
const float crosshairScale = 360.0f;
float vxCrosshair = crosshairScale * velocity.x;
float vyCrosshair = crosshairScale * velocity.y;
const float bgScale = 48.0f;
float vxBg = bgScale * velocity.x;
float vyBg = bgScale * velocity.y;
const float targetScale1 = 16.0f;
float vxTargetRow1 = targetScale1 * velocity.x;
float vyTargetRow1 = targetScale1 * velocity.y;
const float targetScale2 = 24.0f;
float vxTargetRow2 = targetScale2 * velocity.x;
float vyTargetRow2 = targetScale2 * velocity.y;
const float targetScale3 = 32.0f;
float vxTargetRow3 = targetScale3 * velocity.x;
float vyTargetRow3 = targetScale3 * velocity.y;
const float targetScale4 = 40.0f;
float vxTargetRow4 = targetScale4 * velocity.x;
float vyTargetRow4 = targetScale4 * velocity.y;
const float targetScale5 = 48.0f;
float vxTargetRow5 = targetScale5 * velocity.x;
float vyTargetRow5 = targetScale5 * velocity.y;
float xCrosshair = crosshair.position.x + vxCrosshair * delta;
float yCrosshair = crosshair.position.y + vyCrosshair * delta;
float xBg = background.position.x + vxBg * delta;
float yBg = background.position.y + vyBg * delta;
float xTargetRow1 = targetRow1.position.x + vxTargetRow1 * delta;
float yTargetRow1 = targetRow1.position.y + vyTargetRow1 * delta;
float xTargetRow2 = targetRow2.position.x + vxTargetRow2 * delta;
float yTargetRow2 = targetRow2.position.y + vyTargetRow2 * delta;
float xTargetRow3 = targetRow3.position.x + vxTargetRow3 * delta;
float yTargetRow3 = targetRow3.position.y + vyTargetRow3 * delta;
float xTargetRow4 = targetRow4.position.x + vxTargetRow4 * delta;
float yTargetRow4 = targetRow4.position.y + vyTargetRow4 * delta;
float xTargetRow5 = targetRow5.position.x + vxTargetRow5 * delta;
float yTargetRow5 = targetRow5.position.y + vyTargetRow5 * delta;
xCrosshair = MAX(32.0f, xCrosshair);
xCrosshair = MIN(448.0f, xCrosshair);
yCrosshair = MAX(32.0f, yCrosshair);
yCrosshair = MIN(288.0f, yCrosshair);
xBg = MAX(210.0f, xBg);
xBg = MIN(270.0f, xBg);
yBg = MAX(120.0f, yBg);
yBg = MIN(200.0f, yBg);
xTargetRow1 = MAX(-16.0f, xTargetRow1);
xTargetRow1 = MIN(16.0f, xTargetRow1);
yTargetRow1 = MAX(0.0f, yTargetRow1);
yTargetRow1 = MIN(16.0f, yTargetRow1);
xTargetRow2 = MAX(-24.0f, xTargetRow2);
xTargetRow2 = MIN(24.0f, xTargetRow2);
yTargetRow2 = MAX(32.0f, yTargetRow2);
yTargetRow2 = MIN(56.0f, yTargetRow2);
xTargetRow3 = MAX(-32.0f, xTargetRow3);
xTargetRow3 = MIN(32.0f, xTargetRow3);
yTargetRow3 = MAX(64.0f, yTargetRow3);
yTargetRow3 = MIN(96.0f, yTargetRow3);
xTargetRow4 = MAX(-40.0f, xTargetRow4);
xTargetRow4 = MIN(40.0f, xTargetRow4);
yTargetRow4 = MAX(92.0f, yTargetRow4);
yTargetRow4 = MIN(132.0f, yTargetRow4);
xTargetRow5 = MAX(-48.0f, xTargetRow5);
xTargetRow5 = MIN(48.0f, xTargetRow5);
yTargetRow5 = MAX(128.0f, yTargetRow5);
yTargetRow5 = MIN(176.0f, yTargetRow5);
crosshair.position = ccp(xCrosshair,yCrosshair);
background.position = ccp(xBg,yBg);
targetRow1.position = ccp(xTargetRow1, yTargetRow1);
targetRow2.position = ccp(xTargetRow2, yTargetRow2);
targetRow3.position = ccp(xTargetRow3, yTargetRow3);
targetRow4.position = ccp(xTargetRow4, yTargetRow4);
targetRow5.position = ccp(xTargetRow5, yTargetRow5);