Search in sources :

Example 1 with StateIngame

use of org.terasology.engine.core.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());
    }
    /*FrameBuffersManager renderingProcess = ingameContext.get(FrameBuffersManager.class);
        if (renderingProcess != null) {
            result.addAll(new ReflectionProvider(renderingProcess, ingameContext).getProperties());
        }*/
    return result;
}
Also used : Context(org.terasology.engine.context.Context) StateIngame(org.terasology.engine.core.modes.StateIngame) GameState(org.terasology.engine.core.modes.GameState) BackdropProvider(org.terasology.engine.rendering.backdrop.BackdropProvider)

Aggregations

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