Permalink
Browse files

Remove entities/bullet and add can_fire? check into shooting.

  • Loading branch information...
1 parent 0a42eca commit 59a052539123b2bfcab396fb189addb41e1a0528 @stderr committed Jan 14, 2012
Showing with 4 additions and 2 deletions.
  1. 0 lib/entities/bullet.rb
  2. +4 −2 lib/entities/player.rb
View
No changes.
View
@@ -31,8 +31,10 @@ def initialize
end
hold(Gosu::KbSpace) do
- bullet = sink.shoot
- $window.game_engine.level.bullets << bullet
+ if sink.weapon.can_fire?
+ bullet = sink.shoot
+ $window.game_engine.level.bullets << bullet
+ end
end
default(:hold) do

0 comments on commit 59a0525

Please sign in to comment.