package ru.vagrant_ai.questionmarkgame.util;
import org.newdawn.slick.Graphics;
import ru.vagrant_ai.questionmarkgame.obj.scenes.Intro;
import ru.vagrant_ai.questionmarkgame.obj.scenes.Scene;
import ru.vagrant_ai.questionmarkgame.obj.scenes.Shop;
import ru.vagrant_ai.questionmarkgame.util.list.SCENE;
public class SceneHandler {
public boolean is_playing;
private Scene current_scene;
public SceneHandler()
{
is_playing = false;
}
public void render(Graphics g)
{
current_scene.perform(g);
}
public void activateScene(SCENE scene)
{
switch(scene)
{
case INTRO:
current_scene = new Intro();
break;
case SHOP:
current_scene = new Shop();
break;
}
is_playing = true;
}
public void deactivateScene()
{
current_scene = null;
is_playing = false;
}
}