Episode 4.3 messed UP PLEASE HELP
Posted: September 21st, 2017, 9:58 am
Hello i did everything correctly and the reticle moves only UPWARDS AND RIGHT SIDE
Its not moving Left and Down side...help me..
Its not moving Left and Down side...help me..
Code: Select all
void Game::UpdateModel()
{
if (wnd.kbd.KeyIsPressed(VK_RIGHT))
{
if (inhibitRight)
{
}
else
{
vx = vx + 1;
inhibitRight = true;
}
}
if (wnd.kbd.KeyIsPressed(VK_LEFT))
{
if (inhibitLeft)
{
}
else
{
vx = vx - 1;
inhibitLeft = true;
}
}
if (wnd.kbd.KeyIsPressed(VK_UP))
{
if (inhibitUp)
{
}
else
{
vy = vy - 1;
inhibitUp = true;
}
}
if (wnd.kbd.KeyIsPressed(VK_LEFT))
{
if (inhibitLeft)
{
}
else
{
vy = vy + 1;
inhibitLeft = true;
}
}
x = x + vx;
y = y + vy;
shapeischanged = (wnd.kbd.KeyIsPressed(VK_SHIFT));
}