Spieler läuft immer
This commit is contained in:
		@@ -12,6 +12,7 @@ let aIsPressed = false;
 | 
			
		||||
let runAnimation;
 | 
			
		||||
 | 
			
		||||
fillArrays();
 | 
			
		||||
startAnimation();
 | 
			
		||||
//currentPosition = window.getComputedStyle(player).left;
 | 
			
		||||
 | 
			
		||||
// Pictures
 | 
			
		||||
@@ -48,10 +49,6 @@ function playerRunAnim()
 | 
			
		||||
 | 
			
		||||
//------------------------------------------------------------- checkInput ------------------------------------------------------------------
 | 
			
		||||
document.addEventListener('keydown', function(event) {
 | 
			
		||||
    if(!aIsPressed && !dIsPressed)
 | 
			
		||||
    {
 | 
			
		||||
        startAnimation();
 | 
			
		||||
    }
 | 
			
		||||
    if(event.key == "d")
 | 
			
		||||
    {
 | 
			
		||||
        if(runDirection != 1)
 | 
			
		||||
@@ -86,7 +83,6 @@ document.addEventListener('keyup', function(event)
 | 
			
		||||
    if(!aIsPressed && !dIsPressed)
 | 
			
		||||
    {
 | 
			
		||||
        runDirection = 0;
 | 
			
		||||
        clearInterval(runAnimation);
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user