/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package colisoes;

import java.awt.Graphics;
import javaPlay.GameEngine;
import javaPlay.GameStateController;
import javaPlay.Keyboard;
import javaPlay.Sprite;

/**
 *
 * @author Gefersom
 */
public class TelaInicial implements GameStateController
{
    Sprite fundo;

    public void load() {
        fundo = new Sprite( "telaInicial.png", 1, 800, 600 );
    }

    public void unload() {

    }

    public void start() {

    }

    //Espera até que o usuário aperte enter para chamar a classe Jogar
    public void step(long timeElapsed)
    {
        Keyboard k = GameEngine.getInstance().getKeyboard();
        
        if ( k.keyDown( Keyboard.ENTER_KEY) == true )
            GameEngine.getInstance().setNextGameStateController( NumerosControle.JOGAR );                    
    }

    //desenha o sprite na tela
    public void draw(Graphics g)
    {       
        fundo.draw(g, 0, 0);
    }

    public void stop() {

    }

}
