Java - Hiding update functions in project -
i'm creating simple game engine in java , i've got packages a:
- game
- input
- time
- graphics
each package handles lot of classes, of them have (and should have) public access. let's focus on 1 important class called mouseinput
.
mouseinput
class handles public static methods getmouseposition(mouseaxis axis) {...}
handles methods updatemouseposition() {...}
.
and want make method (updatemouseposition()
) callable gamebase
class inside game package.
p.s. don't want put classes in 1 package! want separate them don't make project messy.
2th p.s. methods want make callable gamebase
static.
it possible restrict can call public method checking call stack. adds code method receiving call "wrong" calls can rejected.
Comments
Post a Comment