Package com.prineside.tdi2.items
Class DoubleGainShardItem
java.lang.Object
com.prineside.tdi2.Item
com.prineside.tdi2.items.DoubleGainShardItem
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable
,Item.UsableItem
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.prineside.tdi2.Item
Item.D, Item.Factory<T extends Item>, Item.UsableItem
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSellItems
(com.badlogic.gdx.utils.Array<ItemStack> toStacks) boolean
boolean
cpy()
void
fillItemCreationForm
(ItemCreationOverlay overlay) com.badlogic.gdx.scenes.scene2d.Actor
generateIcon
(float size, boolean withShadow) static int
getAcceleratorsForDuration
(int duration) getTitle()
getType()
boolean
void
read
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) boolean
void
toJson
(com.badlogic.gdx.utils.Json json) boolean
useItem()
boolean
void
write
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) Methods inherited from class com.prineside.tdi2.Item
addSellItems, affectedByLuckyWheelMultiplier, canBeUnpacked, fillWithInfo, fromJson, getData, getData, getIconDrawable, getPriceInAcceleratorsForResearchReset, getShadowShift, getSortingScore, isAffectedByDoubleGain, openPack
-
Field Details
-
DEFAULT_DURATION
public static final int DEFAULT_DURATION- See Also:
-
duration
public int duration
-
-
Method Details
-
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) -
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) -
getAnalyticName
- Overrides:
getAnalyticName
in classItem
-
cpy
-
from
-
sameAs
-
canBeSold
public boolean canBeSold() -
getAcceleratorsForDuration
public static int getAcceleratorsForDuration(int duration) -
addSellItems
- Overrides:
addSellItems
in classItem
-
getType
-
getCategory
- Specified by:
getCategory
in classItem
-
getSubcategory
- Specified by:
getSubcategory
in classItem
-
getTitle
-
getDescription
- Specified by:
getDescription
in classItem
-
getRarity
-
isCountable
public boolean isCountable()- Specified by:
isCountable
in classItem
- Returns:
- true, если ItemStack.count учитывается
-
generateIcon
public com.badlogic.gdx.scenes.scene2d.Actor generateIcon(float size, boolean withShadow) - Specified by:
generateIcon
in classItem
-
autoUseWhenAdded
public boolean autoUseWhenAdded()- Specified by:
autoUseWhenAdded
in interfaceItem.UsableItem
- Returns:
- true, если предмет нужно использовать сразу при добавлении в инвентарь
-
useItem
public boolean useItem()- Specified by:
useItem
in interfaceItem.UsableItem
- Returns:
- true, если предмет был использован и расходован
-
toJson
public void toJson(com.badlogic.gdx.utils.Json json) -
useItemNeedsConfirmation
public boolean useItemNeedsConfirmation()- Specified by:
useItemNeedsConfirmation
in interfaceItem.UsableItem
- Returns:
- true, если следует спросить у игрока перед тем, как он использует предмет (чтоб не было мисклика)
-