Closed GoogleCodeExporter closed 8 years ago
I think the problem is with your code. The previous keyboard state hasn't been
set
the first time you query it (second line in your code). You should write an if
test
for this special case.
As a side note: I think it is better to change the last statement to:
previousKeyboardState = currentKeyboardState;
Original comment by lav...@gmail.com
on 4 May 2010 at 5:23
sorry, I didn't copy exact code, it's typo.
Code is like you did :)
but problem is here:
-------------
previousKeyboardState.IsKeyDown (Keys.Space) & currentKeyboardState.IsKeyUp
(Keys.Space)
-------------
can you try? just compare current and previous
I think I can make test
Original comment by gse...@gmail.com
on 4 May 2010 at 5:31
Attach the entire source and I'll test it.
Original comment by lav...@gmail.com
on 4 May 2010 at 5:33
It's commented now.
just uncomment following lines:
int krneki;
if (prejsnjeStanjeTipkovnice.IsKeyDown (Keys.I) & stanjeTipkovnice.IsKeyUp
(Keys.I))
krneki = 0;
Original comment by gse...@gmail.com
on 4 May 2010 at 5:58
Attachments:
The problem is what I mentioned in my first comment. You need to write an if
that
handles the first update (when prejsnjeStanjeTipkovnice is null)
Original comment by lav...@gmail.com
on 4 May 2010 at 6:13
Original comment by lav...@gmail.com
on 4 May 2010 at 6:24
I totaly forgot that.
MSXNA can handle this excpetion. I think it ignores it.
Original comment by gse...@gmail.com
on 4 May 2010 at 7:04
Original issue reported on code.google.com by
gse...@gmail.com
on 4 May 2010 at 5:10