Created
September 16, 2014 16:45
-
-
Save boyanov83/5031670c037cfd2abf4a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.Color; | |
import java.awt.Graphics; | |
import javax.swing.JFrame; | |
public class Main extends JFrame { | |
private static final long serialVersionUID = 1L; | |
private Player player; | |
private Rain rain; | |
public Main() { | |
player = new Player(75, 75, 20, 20); | |
rain = new Rain(); | |
} | |
public void paint(Graphics g) { | |
//g.setColor(Color.blue); | |
//player.draw(g); | |
while (true) { | |
rain.draw(g); | |
} | |
} | |
public static void main(String[] args) { | |
Main main = new Main(); | |
main.setSize(500, 500); | |
main.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | |
main.setResizable(false); | |
main.setVisible(true); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment