问题
I made a game where user navigates a character. Since it is designed for both PC and tablet (with Win8), there are two options how to do it.
1) using keyboard (Key_Down
and Key_Up
events)
2) using touch and hold (Tapped
and Holding
events)
Unfortunately there is a problem with Holding
event, because it raises after a long time period (I think 1 sec). I had to use word long there becase it really is a long time period in games.
Now, I need a better solution. There is a onscreen joystick in the game compounded from four images that stands for arrows. How do I make player's character move immediately and continuously just by tap-and-hold on the arrow image?
回答1:
I'am using javascript for metro app dev and there I'am using MSPointerDown/MSPointerUp for nearly the same. Maybe it is simlar in c#? Can this link help?
来源:https://stackoverflow.com/questions/12159855/metro-app-holding-event-in-games