Package azis

Source Code of azis.HillTest

package azis;

import java.awt.Graphics2D;

import main.Player;
import main.scenario.VolcanoHill;

import age.GameController;
import age.Keyboard;

/**
* Teste da VolcanoHill.
* @author Azis
*
*/
public class HillTest implements GameController {

  VolcanoHill hill;
  Player p;
 
  public static void main(String[] args){
    TestLoader.testGameController(new HillTest(), 5);
  }
 
  @Override
  public void load() {
    hill = new VolcanoHill(100);
    p = new Player(175, 400, 50, 100);
    hill.setPlayerPosition(200);
  }

  @Override
  public void start() {
    // TODO Auto-generated method stub

  }

  @Override
  public void update() {
    if(Keyboard.keyPressed(Keyboard.VK_LEFT))
      hill.moveLeft();
    if(Keyboard.keyPressed(Keyboard.VK_RIGHT))
      hill.moveRight();
    hill.update();
    p.update();
  }

  @Override
  public void render(Graphics2D g) {
    TestLoader.cleanScreen(g);
    hill.render(g);
    p.render(g);
  }

  @Override
  public void unload() {
    // TODO Auto-generated method stub

  }

}
TOP

Related Classes of azis.HillTest

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.