diff --git a/entities/enemy.lua b/entities/enemy.lua index 08ebda5..5fdb5a5 100644 --- a/entities/enemy.lua +++ b/entities/enemy.lua @@ -22,7 +22,7 @@ function Enemy:new(x, y, radius, playableArea) self.height = 22 self.width = 24 - self.x_offset = 18 + self.x_offset = 18 --18 self.y_offset = 20 self.hitbox = { @@ -41,7 +41,16 @@ end function Enemy:draw() --draw stuff love.graphics.rectangle("line", self.hitbox[1], self.hitbox[3], self.width, self.height) - love.graphics.draw(self.image, self.x, self.y, 0, 1, 1) + love.graphics.draw( + self.image, + self.x, + self.y, + 3.14159, + 1, + 1, + (self.x_offset + self.width * 2), + (self.y_offset + self.height * 2) + ) for _, v in ipairs(self.enemyBullets) do v:draw() @@ -92,7 +101,7 @@ end --shoot at the player a variable number of seconds function Enemy:fire() --local fire_origin = { self.x + 26, self.y + 44 } - local fire_origin = { (self.x + (self.width / 2)), self.y + self.height } + local fire_origin = { ((self.x + (self.width / 2)) + self.x_offset), (self.y + self.height + self.y_offset) } if love.timer.getTime() - self.fireTime > self.fireRate then table.insert(self.enemyBullets, Blaster(fire_origin[1], fire_origin[2], "enemy")) self.fireTime = love.timer.getTime() diff --git a/projectplan.md b/projectplan.md index 6570fc1..028b8d9 100644 --- a/projectplan.md +++ b/projectplan.md @@ -2,15 +2,15 @@ Beginning and game notes for a little space game. **TODO:** - Adjust assets --- Assets are currently too large for hitbox registration. Fix that. +--Hitbox on enemy needs adjustment. _Slightly_ off, but not game breakingly so. - Asteroid obsticles - Pickups - Score - Lives System **Steps:** -- Get a player moving -- Shooting - Score +- Lives / Health +- Level Function Testing getting this on my laptop.