First, when you delcared vx and vy in Game.h, is that what allows our reticle to "move" across the screen by only tapping it? Is this accomplished because of the x = x + xv function?
This y = y + xv; Does this function effect the verticality of how the reticle "moves" almost similar to the above function?
We declare the inhibitor variable in Game.h so it will not die in UpdateModel(), and also, why do we set these boolean inhibitor directions as false? (bool inhibitLeft = false;)
I am having difficulty understanding the nesting when we use the inhibtor function.
Code: Select all
if(wnd.kbd.KeyIsPressed(VK_UP))
{
if(inhibitUp)
{
}
else
{
vy = vy - 1;
inhibitUp = true;
}
}
else
{
inhibitUp = false;
}
Thank you all for taking your time to answer my questions!
Edit by albinopapa: Added
Code: Select all
[code]