Move it
Key concepts: Gestures, gesture handler
Resources
Challenge
This is the second challenge. We’ll want to move slimy across the screen, as shown in the video.
But there are some new things to consider:
→ When we tap him, he blinks. So no more “Open eyes button”.
→ Also, when we move him, he gets scared and closes his eyes. He opens them again when we release him.
💡 TIPS && HINTS:
- You’ll need to use a gesture handler.
- You’ll need to combine two gestures, one for the dragging and one for the tapping.
- You’ll need to save the previous position to be able to start from where you left off. Maybe an (x, y) shared value can help.
❔ Questions to consider:
- Is it possible to try to make the timing of the eyes more realistic? How?