A button jumps, B button opens market
This commit is contained in:
		
							parent
							
								
									0d42135358
								
							
						
					
					
						commit
						9904cfc9b8
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -156,7 +156,7 @@ do -- Player
 | 
			
		|||
			self.isFlipped = false
 | 
			
		||||
		else self.vx = 0
 | 
			
		||||
		end
 | 
			
		||||
		if btnp(0) and self.vy == 0 then self.vy = j end
 | 
			
		||||
		if btnp(4) and self.vy == 0 then self.vy = j end
 | 
			
		||||
	end
 | 
			
		||||
  
 | 
			
		||||
	function Player:update()
 | 
			
		||||
| 
						 | 
				
			
			@ -433,7 +433,7 @@ function updateGame()
 | 
			
		|||
	p:update()
 | 
			
		||||
 | 
			
		||||
	if mget(p.x/s,p.y/s) == 48 or mget(p.x/s,p.y/s) == 49 then
 | 
			
		||||
		if btnp(4) then -- A (Z key)
 | 
			
		||||
		if btnp(5) then -- B (X key)
 | 
			
		||||
			currentState = GameState.market
 | 
			
		||||
		end
 | 
			
		||||
	end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue