Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package game.project;
- import javax.swing.JPanel;
- public class MainGameLoop extends JPanel {
- private static final long serialVersionUID = 1L;
- private static boolean Running = true;
- public static int TimeElapsed;
- public MainGameLoop(){
- long TimeBegin = System.nanoTime()/1000000000;
- while(Running){
- long TimeAfter = System.nanoTime()/1000000000;
- long TimeMath = TimeAfter - TimeBegin;
- TimeElapsed = (int) TimeMath;
- MainJFrameConfig.JFrameSize();
- MainRenderHandler MRH = new MainRenderHandler();
- }
- }
- public static void Start(){
- Running = true;
- }
- public static void Stop(){
- Running = false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement