You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
input = newInputHandler(this); // Input begins to record key presses
357
357
setMouse(newMouseHandler(this)); // Mouse tracking and clicking is now recorded
358
358
setWindow(newWindowHandler(this));
@@ -395,7 +395,7 @@ public void run() {
395
395
init(); // Initialize the game environment
396
396
397
397
while (Game.isRunning()) { // Keep looping until game ends
398
-
longnow = System.nanoTime(); // Current time to used check against lastTime (time has passed since entering the loop)
398
+
longnow = System.nanoTime(); // Current time used to check against lastTime (time has passed since entering the loop)
399
399
delta += (now - lastTime) / nsPerTick; // Elapsed time in seconds multiplied by 60
400
400
lastTime = now; // Update the lastTime to the current time (now)
401
401
booleanshouldRender = false;
@@ -526,10 +526,10 @@ public void render() {
526
526
- ("Press Q to quit".length() * 3), getHeight() - 17);
527
527
}
528
528
g.setColor(Color.YELLOW);
529
-
g.drawString(time.getTime(), (getWidth() - 58), (getHeight() - 3)); // Display the current time in yellow in the bottom right corner of the screen (hh:mm:ss)
529
+
g.drawString(time.getTime(), (getWidth() - 58), (getHeight() - 3)); // Displays the current time in yellow in the bottom right corner of the screen (hh:mm:ss)
530
530
g.setColor(Color.GREEN);
531
531
if(backgroundMusic.getActive()) { // If music is turned on
532
-
g.drawString("MUSIC is ON ", 3, getHeight() - 3); // Display "MUSIC IS ON" in green in the bottom left corner of the screen.
532
+
g.drawString("MUSIC is ON ", 3, getHeight() - 3); // Displays "MUSIC IS ON" in green in the bottom left corner of the screen.
533
533
}
534
534
g.dispose(); // Frees up memory and resources for graphics
0 commit comments