Dev Log 2
I created a paper-flipping mechanism using classes and inheritance.
First, I made a parent class called PaperManagement. Inside it, I defined an inner class called Paper, which holds information for each paper object — like the page number, whether it’s the front or back side, and the name of the paper.
Each paper has two indexes assigned:
If it’s the front side, it gets an even number (e.g., 0, 2, 4, etc.)
If it’s the back side, it gets an odd number (e.g., 1, 3, 5, etc.)
These papers (with their indexes) are stored in a List inside the PaperManagement class.
Then, I created a child class called PaperMovement, which inherits from PaperManagement. PaperMovement can access the List from the parent class to:
Find where a specific paper is located, and
Modify its data.
In PaperMovement, users can drag and drop papers onto the screen wherever they want. Also, when the user presses the R button, the current paper flips:
If the paper is showing the front side, it loads the index +1 (the back side).
If the paper is showing the back side, it loads the index -1 (the front side).
PaperPath_DEMO
Status | In development |
Author | SeokwonH |
Genre | Puzzle |
More posts
- Dev Log160 days ago
Leave a comment
Log in with itch.io to leave a comment.