package de.frajul.endlessroll.main.screens;

import android.widget.RelativeLayout;

import de.frajul.endlessroll.R;
import de.frajul.endlessroll.main.GameActivity;
import de.frajul.endlessroll.main.MyGlSurfaceView;
import de.frajul.endlessroll.rendering.Rendering;

/**
 * Created by Julian on 03.08.2017.
 */

public class GLTestScreen extends GLScreen<RelativeLayout> {

    private Rendering rendering;

    public GLTestScreen(GameActivity gameActivity, MyGlSurfaceView glView) throws Exception{
        super(ScreenType.GL_TEST, gameActivity, R.layout.gl_test_screen, glView);
        rendering = new TestScreenRendering(gameActivity);
        glView.addRendering(rendering);
    }

    @Override
    public void prepareToBeShown() {
        gameActivity.getSoundManager().menuMusic.start();

        glView.setCurrentRendering(rendering);
    }

    @Override
    public void onBackKeyDown() {
        flipToCaller();
    }
}
