Permalink
Browse files

Change bullet graphic

  • Loading branch information...
1 parent 814919f commit 00794cd0f7da523ff11d900266df2c906d5d4755 Daniel Mark Schwartz committed Nov 16, 2012
Showing with 3 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. BIN bullet.gif
  3. BIN bullet.png
  4. +2 −2 game.coffee
View
@@ -4,3 +4,4 @@ todo.txt
*.swp
*.swn
*.swo
+*.xcf
View
Deleted file not rendered
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -2,7 +2,7 @@ randInRange = (l, h) ->
l + Math.random() * (h - l)
bulletImage = new Image
-bulletImage.src = 'bullet.gif'
+bulletImage.src = 'bullet.png'
shipImage0 = new Image
shipImage0.src = 'monk_0.png'
@@ -194,7 +194,7 @@ class Game extends atom.Game
atom.context.fillText "Enemies: #{@enemies.length}", 10, 120
spawnBullet: (x, y, dx, dy) ->
- @bullets.push new Bullet x, y, dx, dy, 25
+ @bullets.push new Bullet x, y, dx, dy, bulletImage.width/2
spawnEnemy: (x, y, dx, dy, bulletFreq, bulletSpeed) ->
@enemies.push new Enemy x, y, dx, dy, bulletFreq, bulletSpeed, 10

0 comments on commit 00794cd

Please sign in to comment.