Package ru.vagrant_ai.questionmarkgame.util

Source Code of ru.vagrant_ai.questionmarkgame.util.SceneHandler

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;
  }
 

}
TOP

Related Classes of ru.vagrant_ai.questionmarkgame.util.SceneHandler

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.