Class "PocketItem"⚓︎
Info
你可以通过以下函数获取此类:
Example Code
1 |
|
Functions⚓︎
GetSlot ()⚓︎
int GetSlot ( )⚓︎
local pocketItem = player:GetPocketItem(PillCardSlot.PRIMARY)
For pills, returns PillColor.
if pocketItem:GetType() == PocketItemType.ACTIVE_ITEM then
For pocket active items, returns the corresponding ActiveSlot+1 (so ActiveSlot.SLOT_POCKET + 1
or ActiveSlot.SLOT_POCKET2 + 1
).
Returns an identifying value for this pocket item. Varies depending on the PocketItemType.
local activeItemID = player:GetActiveItem(activeSlot)
end
Returns 0
if the pocket slot is empty.
For cards, returns Card.
1 2 |
|
GetType ()⚓︎
PocketItemType GetType ( )⚓︎
This value is unreliable if the slot is currently empty, as the game sometimes does not clear it. Returns the PocketItemType.