Check if steps exist before performing them automatically in performAutomaticSteps function
Created BOOL variable called replenishSupply to set whether objects can disappear permanently or not. Removed code to hide/show object when replenishing in consumeAndReplenishSupply function so that object just moves to appear location.
Created BOOL variable called drawX to set whether an X should be drawn over a disappearing object
Added initial circulatory epub to library
Added swipe gesture recognizer and swipeGesturePerformed function. When the user does a two finger swipe downwards, the story will skip the current step by performing it for the user. Also added createTextboxView function to potentially restrict the swipe gesture to only be recognized over the text box area; however, this function isn’t currently used as it currently ends up blocking tap gestures on the text box as well.
Changed MARGIN back to 2 pixels since the retina display issue appears to be fixed.
Improve look of menu options, particularly for disappear interactions. The disappearing object (apple) will be grouped to the receiver (horse). The image of the subject performing a transfer and disappear interaction (farmer) will be horizontally flipped and moved closer to the disappearing object to make it look like it is giving the object to the receiver. Additionally, if an object is already grouped to other objects, the menu options should show most of these (e.g. when the farmer puts hay into the cart, the menu option should show farmer, hay, cart, AND tractor).
Check if steps exist before accessing solution in pan gesture. This should allow objects to be moved even if no metadata file is included in the epub.
Fixed bug where app would crash trying to create a menu item image for an object that does not exist on the page. This happened because the currentGroupings array was not re-initialized each time the page loaded (via pressing the Next button).
Code cleanup and adding additional comments
Changed MARGIN back to 13. It seems that retina displays need a larger margin value. We should calculate this based on the display later.
Changed way currentSentence and totalSentence are set to account for multiple pages in a PhysicalManipulationActivity
Changed setups so that they can be applied to a specific page in the PhysicalManipulationActivity instead of the whole chapter.
Allow user to move on to next sentence if the current action sentence has 0 solution steps. Normally if a sentence has no solution steps, it is not considered an action sentence, but there is one sentence in the circulation texts where the user must perform an action in real life (rather than in the application). In the future, it might be better to give that particular sentence a separate class and color it differently.
Updated versions of all four epubs. Farm and House have been updated to reflect page-specific setup changes. Best Farm is mostly functioning but still requires changes. Circulatory still needs work.
Changed the way PossibleInteraction objects are created to allow disappear interactions to occur even when the disappearing object is the subject/obj1 of the solution step. (Normally the disappearing object is the object/obj2 of the solution step. This change should allow oxygen to disappear into the blood cell for the circulatory texts.)
Implemented checkAndSwap solution step where user must tap on the correct backgroundObject to swap its image. This step also works via swipe gesture. The function getManipulationObjectAtPoint was changed to be a more general getObjectAtPoint where you have to pass in the specific object class (manipulation or background) you want to get.
Changed the way the correct object is determined based on how the solution is written for transferAndGroup steps. In some cases, the correct object is object1 of the next step, while in other cases, it is object2 of the next step. This change was added because the farmer wasn’t able to give the milk bucket to the cat in the Best Farm texts due to the app detecting the incorrect object.
Adjusted the way menu options are painted for ungroup interactions
Addressed comments in pull request #29