Skip to main content
4 events
when toggle format what by license comment
Jun 18, 2020 at 16:47 comment added Philipp @Eidemarkki No, I would offer methods to obtain these components, perhaps with parameters. This allows you to decide whether to implement them as simple getters or if you want to implement them as more complex factory methods which hide some logic behind them to set up and initialize these components. And I certainly would not expose them as public variables, because then a clueless user could do VoxelWorld.chunkManager = null. Or try to replace them with their own classes, which will then break with your next update because you changed interfaces which are supposed to be internal.
Jun 18, 2020 at 16:41 comment added Eldemarkki Do you mean that the VoxelWorld wouldn't have any functions at all (not even for redirecting), but only public references to all the components like this?
Jun 18, 2020 at 16:29 history edited Philipp CC BY-SA 4.0
added 385 characters in body
Jun 18, 2020 at 16:24 history answered Philipp CC BY-SA 4.0