} // HasSwipe public static Vector2 GetSwipeAsVector() { if (!SwipeManager.HasSwipe()) { return new Vector2(0.0f, 0.0f); } // if switch(SwipeManager.swipeDirection) { case Swipe.Up: return new Vector2( 0.0f, 1.0f); case Swipe.UpLeft: return new Vector2(-1.0f, 1.0f); case Swipe.UpRight: return new Vector2( 1.0f, 1.0f); case Swipe.Down: return new Vector2( 0.0f, -1.0f); case Swipe.DownLeft: return new Vector2(-1.0f, -1.0f); case Swipe.DownRight: return new Vector2( 1.0f, -1.0f); case Swipe.Left: return new Vector2(-1.0f, 0.0f); case Swipe.Right: return new Vector2( 1.0f, 0.0f); } // switch return new Vector2(0.0f, 0.0f); } // GetSwipeAsVector