Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.prineside.tdi2.items;
- import com.badlogic.gdx.scenes.scene2d.Actor;
- import com.badlogic.gdx.scenes.scene2d.Group;
- import com.badlogic.gdx.scenes.scene2d.ui.Image;
- import com.prineside.tdi2.Game;
- import com.prineside.tdi2.Item;
- import com.prineside.tdi2.enums.ItemCategoryType;
- import com.prineside.tdi2.enums.ItemSubcategoryType;
- import com.prineside.tdi2.enums.ItemType;
- import com.prineside.tdi2.enums.RarityType;
- public class AcceleratorItem extends Item {
- private final AcceleratorItemFactory factory;
- public boolean isCountable() {
- return true;
- }
- private AcceleratorItem(AcceleratorItemFactory acceleratorItemFactory) {
- this.factory = acceleratorItemFactory;
- }
- public ItemType getType() {
- return ItemType.ACCELERATOR;
- }
- public ItemCategoryType getCategory() {
- return ItemCategoryType.MATERIALS;
- }
- public ItemSubcategoryType getSubcategory() {
- return ItemSubcategoryType.M_CURRENCY;
- }
- public Item cpy() {
- return this.factory.create();
- }
- public Actor generateIcon(float f, boolean z) {
- if (z) {
- Group group = new Group();
- group.setTransform(false);
- group.setSize(f, f);
- Image image = new Image(this.factory.drawable);
- image.setSize(f, f);
- image.setPosition(getShadowShift(f), -getShadowShift(f));
- image.setColor(0.0f, 0.0f, 0.0f, 0.28f);
- group.addActor(image);
- Image image2 = new Image(this.factory.drawable);
- image2.setSize(f, f);
- group.addActor(image2);
- return group;
- }
- Image image3 = new Image(this.factory.drawable);
- image3.setSize(f, f);
- return image3;
- }
- public CharSequence getTitle() {
- return Game.i.localeManager.i18n.get("item_title_ACCELERATOR");
- }
- public CharSequence getDescription() {
- return Game.i.localeManager.i18n.get("item_description_ACCELERATOR");
- }
- public RarityType getRarity() {
- return RarityType.VERY_RARE;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement