Merge branch 'main' of https://git.bib.de/PBG2H23AKL/FEE_MathRunner
This commit is contained in:
commit
5fd902d612
@ -12,6 +12,7 @@ let aIsPressed = false;
|
|||||||
let runAnimation;
|
let runAnimation;
|
||||||
|
|
||||||
fillArrays();
|
fillArrays();
|
||||||
|
startAnimation();
|
||||||
//currentPosition = window.getComputedStyle(player).left;
|
//currentPosition = window.getComputedStyle(player).left;
|
||||||
|
|
||||||
// Pictures
|
// Pictures
|
||||||
@ -48,10 +49,6 @@ function playerRunAnim()
|
|||||||
|
|
||||||
//------------------------------------------------------------- checkInput ------------------------------------------------------------------
|
//------------------------------------------------------------- checkInput ------------------------------------------------------------------
|
||||||
document.addEventListener('keydown', function(event) {
|
document.addEventListener('keydown', function(event) {
|
||||||
if(!aIsPressed && !dIsPressed)
|
|
||||||
{
|
|
||||||
startAnimation();
|
|
||||||
}
|
|
||||||
if(event.key == "d")
|
if(event.key == "d")
|
||||||
{
|
{
|
||||||
if(runDirection != 1)
|
if(runDirection != 1)
|
||||||
@ -86,7 +83,6 @@ document.addEventListener('keyup', function(event)
|
|||||||
if(!aIsPressed && !dIsPressed)
|
if(!aIsPressed && !dIsPressed)
|
||||||
{
|
{
|
||||||
runDirection = 0;
|
runDirection = 0;
|
||||||
clearInterval(runAnimation);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user