redesign music and drone selection
This commit is contained in:
13
source/scripts/DroneCard.lua
Normal file
13
source/scripts/DroneCard.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
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
|
22
source/scripts/pageSprite.lua
Normal file
22
source/scripts/pageSprite.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
PageSprite = {}
|
||||
class('PageSprite').extends(NobleSprite)
|
||||
|
||||
function PageSprite:init(x, y)
|
||||
Baleba.super.init(self, "assets/sprites/pages", true)
|
||||
self.animation:addState("1", 1, 1)
|
||||
self.animation:addState("2", 2, 2)
|
||||
self.animation:addState("3", 3, 3)
|
||||
self.animation:addState("4", 4, 4)
|
||||
self.animation:setState("1")
|
||||
|
||||
-- self:setCenter(0, 0)
|
||||
|
||||
self:setSize(64, 64)
|
||||
|
||||
self:moveTo(x, y)
|
||||
self:add()
|
||||
end
|
||||
|
||||
function PageSprite:set(page)
|
||||
self.animation:setState(page .. "")
|
||||
end
|
Reference in New Issue
Block a user