package colro;

import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.Point;
import java.awt.Toolkit;
import java.awt.event.KeyEvent;
import java.awt.image.BufferedImage;

import javax.media.opengl.GL;

import eng.Data;

import world.GameScene;

@SuppressWarnings("serial")
public class Game extends GameScene {
	
	public Game() {
		
	}
	
	public void initiate(Data data) {
		
		super.initiate(data);
		
		audio = "/audio/BGM/Stay Strong.mp3";
	}
	
	public void initializeWorld(GL gl) {
		world = new World(gl);
	}
	
	public void update() {
		
		super.update();
		
		for(int i = 0; i < input.getKeysDown().size(); i++)
			
			if(input.getKeysDown().get(i) == KeyEvent.VK_ESCAPE)
				ended = true;
	}
	
	public Cursor getCursor() {
		
		Toolkit toolkit = Toolkit.getDefaultToolkit();
		Dimension dim = toolkit.getBestCursorSize(WIDTH, HEIGHT);
		Point cursorHotSpot = new Point(dim.width / 2, dim.height / 2);
		BufferedImage cursorImg = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
		
		return Toolkit.getDefaultToolkit().createCustomCursor(cursorImg, cursorHotSpot, "blank cursor");
	}
}