dimanche 25 octobre 2015

Implement callbacks for game state methods

In my game engine I want to have start() and update() callback methods much like in Unity3D. They will form 'GameListener' interface, which the user should implement to get to them. How do I implement these callbacks without adding any listeners? For example, in libGDX, you have to implement ApplicationListener interface to get access to render() and start() methods without adding any listeners.

Aucun commentaire:

Enregistrer un commentaire