Skip to content

Instantly share code, notes, and snippets.

@PanJohnny
Created November 20, 2021 20:00
Show Gist options
  • Save PanJohnny/eecf2607ba28cd7c0e2f26b5b7b84cd1 to your computer and use it in GitHub Desktop.
Save PanJohnny/eecf2607ba28cd7c0e2f26b5b7b84cd1 to your computer and use it in GitHub Desktop.
public class ExampleProject implements RenderHook, GameComponent {
public void render(Graphics2D g) {
g.setColor(Color.RED);
g.fillRect(0, 0, 100, 100);
}
public static void main(String[] args) {
Game game = new Game("Example game", new GameOptions());
game.add(new ExampleProject());
game.start();
game.window.setVisible(true);
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment