Forgot to add some code -_-
This commit is contained in:
parent
58eb41c1d8
commit
53566d9ad0
|
@ -8,6 +8,21 @@ window.addEventListener("load", function() {
|
||||||
"game_frame",createAssetURI("assets"),
|
"game_frame",createAssetURI("assets"),
|
||||||
]; main();
|
]; main();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
document.esc = false;
|
||||||
|
document.addEventListener('keydown', function(e) {
|
||||||
|
if (e.key === 'Escape') {
|
||||||
|
e.preventDefault();
|
||||||
|
document.esc = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
document.addEventListener('keyup', function(e) {
|
||||||
|
if (e.key === 'Escape') {
|
||||||
|
e.preventDefault();
|
||||||
|
document.esc = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
|
@ -1846,9 +1846,6 @@ public class EaglerAdapterImpl2 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean escapeKeyPressed() {
|
public static boolean escapeKeyPressed() {
|
||||||
if(escapeKeyPressed2()) {
|
|
||||||
System.out.println("Escape Key Pressed!");
|
|
||||||
}
|
|
||||||
return getEventKey() == 1 || escapeKeyPressed2();
|
return getEventKey() == 1 || escapeKeyPressed2();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,26 @@
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||||
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
||||||
<script type = text/javascript>
|
<script type = text/javascript>
|
||||||
window.addEventListener("load", function() {
|
window.addEventListener("load", function() {
|
||||||
window.classicConfig = ["game","resources.mc"];
|
window.classicConfig = ["game","resources.mc"];
|
||||||
main();
|
main();
|
||||||
});
|
});
|
||||||
</script>
|
|
||||||
|
document.esc = false;
|
||||||
|
document.addEventListener('keydown', function(e) {
|
||||||
|
if (e.key === 'Escape') {
|
||||||
|
e.preventDefault();
|
||||||
|
document.esc = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
document.addEventListener('keyup', function(e) {
|
||||||
|
if (e.key === 'Escape') {
|
||||||
|
e.preventDefault();
|
||||||
|
document.esc = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body style="margin:0px;width:100vw;height:100vh;" id="game">
|
<body style="margin:0px;width:100vw;height:100vh;" id="game">
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user