제스처를 시도 할 때 내보기를 스크롤하는 방법 (또는 모든 개체를 오프셋하는 방법)에 대한 수학을 이해할 수 없습니다. . 나는 스크롤이 어떤 종류의 편이성을 가지길 원한다.XNA의 스크롤 화면
public override void Update(GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen)
{
float elapsed = (float)gameTime.ElapsedGameTime.TotalSeconds;
//Some math to change 'matrixOffsetY'
//I use 'matrixOffsetY' to offset my objects in Draw()
base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen);
}
여기 어려운해서는 안됩니다 제스처 이벤트
public override void HandleInput(InputState input)
{
if (input == null)
throw new ArgumentNullException("input");
while (TouchPanel.IsGestureAvailable)
{
GestureSample gesture = TouchPanel.ReadGesture();
switch (gesture.GestureType)
{
case GestureType.Flick:
{
//Set a variable with some math? Using:
//gesture.Delta
//gesture.Delta gives us pixels/sec
break;
}
default: return;
}
}
}
이에게, 그러나 나는 뇌 동결이 :) 저를 도와주세요!
와우. 내가 예상했던 것보다 완벽하고 훌륭하게 작동합니다! 감사. – Frexuz
안녕하세요, Frexuz, 다행입니다. –