Add new enemy, refactor a bit, add armor.

This commit is contained in:
2023-09-30 15:34:29 -04:00
parent 4aa4c129dc
commit f6ae85dcb1
4 changed files with 39 additions and 5 deletions

14
src/enemy/ebi.lua Normal file
View File

@ -0,0 +1,14 @@
-- A shrimp-like enemy unit
import "CoreLibs/object"
import "CoreLibs/graphics"
import "CoreLibs/sprites"
import "entity"
local gfx <const> = playdate.graphics
class("Ebi").extends(Entity)
function Ebi:init()
local img = gfx.image.new(10, 10, gfx.kColorBlack)
Ebi.super.init(self, img, 5)
end

14
src/enemy/ika.lua Normal file
View File

@ -0,0 +1,14 @@
-- A squid-like enemy unit
import "CoreLibs/object"
import "CoreLibs/graphics"
import "CoreLibs/sprites"
import "entity"
local gfx <const> = playdate.graphics
class("Ika").extends(Entity)
function Ika:init()
local img = gfx.image.new(50, 50, gfx.kColorBlack)
Ika.super.init(self, img, 25, 1)
end