Skip to content

Commit

Permalink
patch GameFrame.java
Browse files Browse the repository at this point in the history
  • Loading branch information
OakBricks-old authored Jul 6, 2021
1 parent 40c0bb9 commit bb0fb29
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions GameFrame.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* Decompiled with CFR 0.151.
*/
package game;

import java.awt.*;
import java.net.URL;
import java.util.Timer;
import java.util.TimerTask;
import javax.swing.JFrame;

public class GameFrame
extends JFrame {
private static final long serialVersionUID = 1L;
public static String title = "v1.7.0";
public static int secondsPassed;
public static int minutesPassed;
public static int tSecondsPassed;
GetTheAppleGame getTheAppleGame;

GameFrame() {
URL resource = getClass().getClassLoader().getResource("icon_mdk.png");
this.add(new GamePanel());
this.setTitle("Get The Apple! " + title);
this.setDefaultCloseOperation(3);
this.setResizable(true);
this.pack();
this.setVisible(true);
this.setLocationRelativeTo(null);
Image icon = Toolkit.getDefaultToolkit().getImage(resource);
this.setIconImage(icon);
Timer timer = new Timer();
TimerTask task = new TimerTask(){

@Override
public void run() {
++secondsPassed;
}
};
timer.scheduleAtFixedRate(task, 1000L, 1000L);
Timer tTimer = new Timer();
TimerTask tTask = new TimerTask(){

@Override
public void run() {
++tSecondsPassed;
}
};
tTimer.scheduleAtFixedRate(tTask, 1000L, 1000L);
}
}

0 comments on commit bb0fb29

Please sign in to comment.