animation variable gemacht
This commit is contained in:
		@@ -3,7 +3,8 @@ let tomAnim = [];
 | 
			
		||||
let enemyAnim = [];
 | 
			
		||||
let playerAnimState = 0;
 | 
			
		||||
let runDirection = 0;
 | 
			
		||||
let runSpeed = 5;
 | 
			
		||||
let runSpeed = 25;
 | 
			
		||||
let animationSpeed = 50;
 | 
			
		||||
let currentPosition = 0;
 | 
			
		||||
let player = document.querySelector("#fuchs img");
 | 
			
		||||
let dIsPressed = false;
 | 
			
		||||
@@ -32,7 +33,7 @@ function gameLoop()
 | 
			
		||||
//-------------------------------------------------------------- Animation -----------------------------------------------------------------------
 | 
			
		||||
function startAnimation()
 | 
			
		||||
{
 | 
			
		||||
    runAnimation = setInterval(playerRunAnim, 100);
 | 
			
		||||
    runAnimation = setInterval(playerRunAnim, animationSpeed);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function playerRunAnim()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user