on clear le code
This commit is contained in:
		
							parent
							
								
									8e23565602
								
							
						
					
					
						commit
						24d948bdbd
					
				
					 1 changed files with 0 additions and 18 deletions
				
			
		|  | @ -21,24 +21,6 @@ class Input { | |||
| 
 | ||||
|             let mouseX = (e.clientX - bounds.x)*this.canvas.width/bounds.width; | ||||
|             let mouseY = (e.clientY - bounds.y)*this.canvas.height/bounds.height; | ||||
|             //console.log(Math.round(mouseX),",",Math.round(mouseY)); //for debug
 | ||||
| 
 | ||||
|             //if(this.parity){ ////// to create collisions for a map
 | ||||
|             //    this.dmx=Math.round(mouseX);
 | ||||
|             //    this.dmy=Math.round(mouseY);
 | ||||
|             //    this.parity=!this.parity;
 | ||||
|             //}else{
 | ||||
|             //    let mx = Math.round((e.clientX - bounds.x)*this.canvas.width/bounds.width);
 | ||||
|             //    let my = Math.round((e.clientY - bounds.y)*this.canvas.height/bounds.height);
 | ||||
|             //    let x = Math.min(mx,this.dmx);
 | ||||
|             //    let y = Math.min(my,this.dmy);
 | ||||
|             //    let w = Math.abs(mx-this.dmx);
 | ||||
|             //    let h = Math.abs(my-this.dmy);
 | ||||
|             //    this.toPrint+="new Square("+x.toString()+","+y.toString()+","+player.z.toString()+","+w.toString()+","+h.toString()+"),";
 | ||||
|             //    navigator.clipboard.writeText(this.toPrint);
 | ||||
|             //    maps[player.z].squares.push(new Square(x,y,player.z,w,h));
 | ||||
|             //    this.parity=!this.parity;
 | ||||
|             //}
 | ||||
| 
 | ||||
|             let dx = mouseX-player.x; | ||||
|             let dy = mouseY-player.y;     | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue