mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-15 19:22:25 +08:00
35 lines
821 B
Lua
35 lines
821 B
Lua
local base = require 'ui_emu.base'
|
|
local SelectableItem = base.SelectableItem
|
|
|
|
---@class CardItem: SelectableItem
|
|
local CardItem = SelectableItem:subclass("CardItem")
|
|
|
|
function CardItem:initialize(scene, id)
|
|
SelectableItem.initialize(self, scene, id)
|
|
Fk:filterCard(id, Fk:currentRoom():getCardOwner(id))
|
|
end
|
|
|
|
---@class Photo: SelectableItem
|
|
---@field public state string
|
|
local Photo = SelectableItem:subclass("Photo")
|
|
|
|
function Photo:initialize(scene, id)
|
|
SelectableItem.initialize(self, scene, id)
|
|
self.state = "normal"
|
|
end
|
|
|
|
function Photo:toData()
|
|
local ret = SelectableItem.toData(self)
|
|
ret.state = self.state
|
|
return ret
|
|
end
|
|
|
|
---@class SkillButton: SelectableItem
|
|
local SkillButton = SelectableItem:subclass("SkillButton")
|
|
|
|
return {
|
|
CardItem = CardItem,
|
|
Photo = Photo,
|
|
SkillButton = SkillButton,
|
|
}
|