Update

9 views
Skip to first unread message

José Juan Montes

unread,
Feb 27, 2011, 1:30:29 PM2/27/11
to jgf-...@googlegroups.com

Hi.

A few days ago I added injection mechanism to JGF which greatly improves usability of the framework. See the example below (note the @Register annotation).


/**
 * InGameLogic just updates scene and entities.
 */
@Configurable
public class InGameLogic extends BaseLogicState {

    @Register (ref = "scene/manager")
    private SceneManager sceneManager;

    @Register (ref = "entity")
    private EntityManager entityManager;
   
    @Override
    public void doUpdate(float tpf) {

        entityManager.update(tpf);
        sceneManager.update(tpf);
       
    }

}

Jose Juan Montes
Reply all
Reply to author
Forward
0 new messages