4 changed files with 44 additions and 5 deletions
@ -0,0 +1,22 @@ |
|||
--! file enemy.lua |
|||
require("blaster") |
|||
Enemy = Object:extend() |
|||
|
|||
function Enemy:new(x, y) |
|||
self.x = x |
|||
self.y = y |
|||
self.width = 30 |
|||
self.height = 30 |
|||
self.health = 100 |
|||
end |
|||
|
|||
function Enemy:draw() |
|||
--draw stuff |
|||
love.graphics.rectangle("line", self.x, self.y, self.width, self.height) |
|||
end |
|||
|
|||
function Enemy:update(dt) |
|||
--movement |
|||
end |
|||
|
|||
--shoot at the player a variable number of seconds |
|||
Loading…
Reference in new issue