added swipe on Story Mode. So if playing a duel on story mode, you can cancel with swipe down.
This commit is contained in:
@@ -129,3 +129,17 @@ void GameStateStory::ButtonPressed(int controllerId, int controlId)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void GameStateStory::OnScroll(int, int inYVelocity)
|
||||
{
|
||||
if (abs(inYVelocity) > 300)
|
||||
{
|
||||
bool flickUpwards = (inYVelocity < 0);
|
||||
int velocity = (inYVelocity < 0) ? (-1 * inYVelocity) : inYVelocity;
|
||||
while(velocity > 0)
|
||||
{
|
||||
mEngine->HoldKey_NoRepeat(flickUpwards ? JGE_BTN_DOWN : JGE_BTN_UP);
|
||||
velocity -= 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user