Skip to content
This repository has been archived by the owner on Jan 10, 2019. It is now read-only.

Commit

Permalink
Remove: SHOOT
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Robinson committed Mar 16, 2012
1 parent 5d82e97 commit c78412a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
6 changes: 0 additions & 6 deletions bullet.lua
Expand Up @@ -15,14 +15,8 @@ local Bullet = function(...)
_x = ix
_y = iy + S(v)

local function shoot(x, y)
_x = x
_y = y + S(v)
end

return {
_draw_list = L(draw_list)(_x, _y),
shoot = shoot,
}
end

Expand Down
2 changes: 0 additions & 2 deletions player.lua
Expand Up @@ -41,8 +41,6 @@ local Player = function(...)

return {
_draw_list = L(draw_list)(_x, _y),
_x = _x,
_y = _y,
left = move(-1),
right = move(1),
}
Expand Down
9 changes: 1 addition & 8 deletions world.lua
Expand Up @@ -7,7 +7,7 @@ local Player = require 'player'
local Swarm = require 'swarm'

return function()
local bullet = Bullet(-1, -1, C.bullet.v)
local bullet = Bullet(500, 500, C.bullet.v)

local swarm = Swarm(C.swarm.initial.x,
C.swarm.initial.y)
Expand All @@ -17,13 +17,6 @@ return function()
link('key.left', player.left)
link('key.right', player.right)

local function shoot()
bullet.shoot(player._x(),
player._y() - C.bullet.height / 2)
end
link('key. ', shoot)
link('key.up', shoot)

__.extend(Screen, {bullet, swarm, player})

await('key.escape')
Expand Down

0 comments on commit c78412a

Please sign in to comment.