Search in sources :

Example 1 with StateIngame

use of org.terasology.engine.modes.StateIngame in project Terasology by MovingBlocks.

the class SceneProperties method getProperties.

@Override
public List<Property<?>> getProperties() {
    List<Property<?>> result = Lists.newArrayList();
    GameState gameState = engine.getState();
    if (!(gameState instanceof StateIngame)) {
        return result;
    }
    StateIngame ingameState = (StateIngame) gameState;
    Context ingameContext = ingameState.getContext();
    BackdropProvider backdropProvider = ingameContext.get(BackdropProvider.class);
    if (backdropProvider != null) {
        result.addAll(new ReflectionProvider(backdropProvider, ingameContext).getProperties());
    }
    BackdropRenderer backdropRenderer = ingameContext.get(BackdropRenderer.class);
    if (backdropRenderer != null) {
        result.addAll(new ReflectionProvider(backdropRenderer, ingameContext).getProperties());
    }
    /*FrameBuffersManager renderingProcess = ingameContext.get(FrameBuffersManager.class);
        if (renderingProcess != null) {
            result.addAll(new ReflectionProvider(renderingProcess, ingameContext).getProperties());
        }*/
    return result;
}
Also used : Context(org.terasology.context.Context) StateIngame(org.terasology.engine.modes.StateIngame) GameState(org.terasology.engine.modes.GameState) BackdropProvider(org.terasology.rendering.backdrop.BackdropProvider) BackdropRenderer(org.terasology.rendering.backdrop.BackdropRenderer)

Aggregations

Context (org.terasology.context.Context)1 GameState (org.terasology.engine.modes.GameState)1 StateIngame (org.terasology.engine.modes.StateIngame)1 BackdropProvider (org.terasology.rendering.backdrop.BackdropProvider)1 BackdropRenderer (org.terasology.rendering.backdrop.BackdropRenderer)1