I´m making a game where the player has to set bombs. Everytime when a bomb is set. The scrollable area gets wider and i can scroll out of the gameplay area. It does not stop at the boarder where it should stop.
First off, I don’t know how you’re using your scrollView, so I can’t comment too far on it. I don’t know how useful they would be in a game situation, since they have a fair amount of gotchas when it comes to touch logic.
Regardless, as the docs suggest, adding items to a scrollview increases their width and/or height. Are you saying that you don’t see where you can reset your width? Or you don’t see the item that you inserted into the scrollview?
now the view is limited and don´t gain width, but the size of the viewable area before the bomb function has not the same size after the bomb function ^^
sometimes it is a little bit buggy but it seems to nearly work. will check the code and work on it.
is there another way to make the gameplay area over viewable? like in angry birds? so he can see the level before he starts?
In order to make your entire level scrollable, you could ditch the scrollView and add a touch listener that allows the player to pan around the level. Using a “moved” event listener would be the first step. This is a super-old forum post, but the logic is still sound:
First off, I don’t know how you’re using your scrollView, so I can’t comment too far on it. I don’t know how useful they would be in a game situation, since they have a fair amount of gotchas when it comes to touch logic.
Regardless, as the docs suggest, adding items to a scrollview increases their width and/or height. Are you saying that you don’t see where you can reset your width? Or you don’t see the item that you inserted into the scrollview?
now the view is limited and don´t gain width, but the size of the viewable area before the bomb function has not the same size after the bomb function ^^
sometimes it is a little bit buggy but it seems to nearly work. will check the code and work on it.
is there another way to make the gameplay area over viewable? like in angry birds? so he can see the level before he starts?
In order to make your entire level scrollable, you could ditch the scrollView and add a touch listener that allows the player to pan around the level. Using a “moved” event listener would be the first step. This is a super-old forum post, but the logic is still sound: