fpv/source/scripts/DroneCard.lua

14 lines
343 B
Lua
Raw Normal View History

2024-06-12 01:22:12 +03:00
local pd <const> = playdate
local gfx <const> = Graphics
local fontSimple = Graphics.font.new('assets/fonts/peridot_7')
class('DroneCard').extends(gfx.sprite)
function DroneCard:init(x, y, drone)
self:setImage(gfx.image.new('assets/images/card_' .. drone.id .. '.png'))
self:setCenter(0, 0)
self:moveTo(x, y)
self:add()
end