I'm creating simple game engine in Java and I've got some packages like a:
- Game
- Input
- Time
- Graphics
Each package handles a lot of classes, most of them have (And should have) public access. Let's focus on one most important class called MouseInput
.
MouseInput
class handles ONLY public static methods like a getMousePosition(MouseAxis axis) {...}
but it also handles some methods like a updateMousePosition() {...}
.
And now I want to make this method (updateMousePosition()
) callable ONLY by GameBase
class that is inside Game package.
P.s. I don't want to put all those classes in one package! I want to separate them to don't make my project messy.
2th P.s. All those methods that I want to make callable only by GameBase
are static.