-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Gabriel Grimberg
committed
Feb 7, 2017
1 parent
62acc75
commit 1406adb
Showing
2 changed files
with
45 additions
and
46 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
public void mousePressed() | ||
{ | ||
quitClicked(); | ||
startClicked(); | ||
hClicked(); | ||
highClicked(); | ||
} | ||
|
||
public void mouseReleased() | ||
{ | ||
//If mouse released set it back to false. | ||
mscbtnStr = false; | ||
mscbtnEnd = false; | ||
mscbtnH = false; | ||
mscbtnHigh = false; | ||
} | ||
|
||
public void keyPressed() | ||
{ | ||
keys[keyCode] = true; | ||
|
||
//Up arrow to go to main menu when dead. | ||
if(keyCode == UP && gameState == 2 || gameState == 3 || gameState == 4) | ||
{ | ||
reset(); | ||
cursor(); | ||
} | ||
|
||
} | ||
|
||
public void keyReleased() | ||
{ | ||
keys[keyCode] = false; | ||
} | ||
|
||
public boolean keyCheck(int x) | ||
{ | ||
if (keys.length >= x) | ||
{ | ||
return keys[x] || keys[Character.toUpperCase(x)]; | ||
} | ||
return false; | ||
} |