Skip to content

Commit

Permalink
try no tube
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasRamos5 committed Jul 10, 2023
1 parent 82edfd2 commit a849c73
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions _notebooks/2023-06-13-Mario.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -769,35 +769,12 @@
" c2.drawImage(this.image, this.position.x, this.position.y);\n",
" }\n",
" }\n",
" class Tube {\n",
" constructor(image) {\n",
" this.position = {\n",
" x: 10,\n",
" y: 10\n",
" }\n",
" this.image = image\n",
" this.width = 175\n",
" this.height = 200\n",
" # this.velocity = {\n",
" # x: 0 \n",
" # }\n",
" }\n",
"\n",
" draw() {\n",
" c2.drawImage(this.image, this.position.x, this.position.y)\n",
" }\n",
" \n",
" # update() {\n",
" # this.position.x += this.velocity.x\n",
" # this.draw()\n",
" # }\n",
"}\n",
"\n",
" let image = new Image();\n",
" image.onload = function() {\n",
" const player2 = new Player2();\n",
" const platform2 = new Platform2(image);\n",
" const tube = new Tube(image)\n",
" const keys2 = {\n",
" right: {\n",
" pressed: false\n",
Expand All @@ -812,7 +789,6 @@
" c2.clearRect(0, 0, canvas2.width, canvas2.height);\n",
" player2.update();\n",
" platform2.draw();\n",
" tube.draw();\n",
" if (keys2.right.pressed) {\n",
" player2.velocity.x = 5;\n",
" } else if (keys2.left.pressed) {\n",
Expand Down

0 comments on commit a849c73

Please sign in to comment.