change player assets
This commit is contained in:
		
							parent
							
								
									47ac036995
								
							
						
					
					
						commit
						7b3a8d4b82
					
				
					 7 changed files with 3 additions and 4 deletions
				
			
		
							
								
								
									
										
											BIN
										
									
								
								assets/body.png
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/body.png
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 36 KiB | 
							
								
								
									
										
											BIN
										
									
								
								assets/body2.png
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/body2.png
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 92 KiB | 
							
								
								
									
										
											BIN
										
									
								
								assets/body3.png
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/body3.png
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 3.1 MiB | 
							
								
								
									
										
											BIN
										
									
								
								assets/pacman.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/pacman.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 50 KiB | 
|  | @ -5,7 +5,6 @@ | |||
|         <script type="text/javascript" src="./js/render.js"></script> | ||||
|         <script type="text/javascript" src="./js/input.js"></script> | ||||
|         <script type="text/javascript" src="./js/network.js"></script> | ||||
|         <script type="text/javascript" src="./js/keyboard.js"></script> | ||||
|         <script type="text/javascript" src="./js/game.js" defer></script> | ||||
|     </head> | ||||
|     <body> | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| let mapWidth = 210.; | ||||
| let mapHeith = 100.; | ||||
| const playerSize = 50.; | ||||
| const playerSize = 75.; | ||||
| const playerSpeed=.2; | ||||
| const halfSqrtTwo=0.70710678118; | ||||
| class Player | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| const img = new Image(); | ||||
| img.src = "./assets/body3.png"; | ||||
| img.src = "./assets/body.png"; | ||||
| 
 | ||||
| class Render { | ||||
| 
 | ||||
|  | @ -32,7 +32,7 @@ class Render { | |||
| 	    this.ctx.rotate(player.angle); | ||||
| 	    this.ctx.drawImage(img, -playerSize / 2, -playerSize / 2, playerSize, playerSize); | ||||
| 	    this.ctx.restore(); | ||||
|         this.ctx.fillStyle="#FF0000"; | ||||
|         this.ctx.fillStyle = 'white'; | ||||
|         this.ctx.font="10pt arial"; | ||||
|         this.ctx.fillText(player.name,player.x-player.name.length*10/3,player.y-playerSize/1.8); | ||||
| 	} | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue