Package azis

Source Code of azis.TestLoader

package azis;
import age.GameEngine;
import age.GameController;

import java.awt.Color;
import java.awt.Graphics2D;

/**
* Classe com m�todo est�tico para carregar facilmente GameControllers para
* efeitos de teste
* @author Azis
*
*/
public class TestLoader {

  /**
   * Carrega um gameController para fins de teste.
   * @param gc GameController a ser rodado.
   * @param engineSpeed Velocidade da GameEngine (0 para velocidade m�xima).
   */
  public static void testGameController(GameController gc, int engineSpeed){
    GameEngine engine = new GameEngine();
    engine.addGameController(0, gc);
    engine.setSpeed(engineSpeed);
    engine.run();
  }
 
  /**
   * Limpa a gamecanvas, pintando-a de branco.
   * @param g gr�ficos da gamecanvas.
   */
  public static void cleanScreen(Graphics2D g){
    g.setColor(Color.white);
    g.fillRect(0, 0, 800, 600);
  }
 
}
TOP

Related Classes of azis.TestLoader

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.