Advertisement
Guest User

Untitled

a guest
Dec 5th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 KB | None | 0 0
  1. package com.prineside.tdi2.items;
  2.  
  3. import com.badlogic.gdx.scenes.scene2d.Actor;
  4. import com.badlogic.gdx.scenes.scene2d.Group;
  5. import com.badlogic.gdx.scenes.scene2d.ui.Image;
  6. import com.prineside.tdi2.Game;
  7. import com.prineside.tdi2.Item;
  8. import com.prineside.tdi2.enums.ItemCategoryType;
  9. import com.prineside.tdi2.enums.ItemSubcategoryType;
  10. import com.prineside.tdi2.enums.ItemType;
  11. import com.prineside.tdi2.enums.RarityType;
  12.  
  13. public class AcceleratorItem extends Item {
  14. private final AcceleratorItemFactory factory;
  15.  
  16. public boolean isCountable() {
  17. return true;
  18. }
  19.  
  20. private AcceleratorItem(AcceleratorItemFactory acceleratorItemFactory) {
  21. this.factory = acceleratorItemFactory;
  22. }
  23.  
  24. public ItemType getType() {
  25. return ItemType.ACCELERATOR;
  26. }
  27.  
  28. public ItemCategoryType getCategory() {
  29. return ItemCategoryType.MATERIALS;
  30. }
  31.  
  32. public ItemSubcategoryType getSubcategory() {
  33. return ItemSubcategoryType.M_CURRENCY;
  34. }
  35.  
  36. public Item cpy() {
  37. return this.factory.create();
  38. }
  39.  
  40. public Actor generateIcon(float f, boolean z) {
  41. if (z) {
  42. Group group = new Group();
  43. group.setTransform(false);
  44. group.setSize(f, f);
  45. Image image = new Image(this.factory.drawable);
  46. image.setSize(f, f);
  47. image.setPosition(getShadowShift(f), -getShadowShift(f));
  48. image.setColor(0.0f, 0.0f, 0.0f, 0.28f);
  49. group.addActor(image);
  50. Image image2 = new Image(this.factory.drawable);
  51. image2.setSize(f, f);
  52. group.addActor(image2);
  53. return group;
  54. }
  55. Image image3 = new Image(this.factory.drawable);
  56. image3.setSize(f, f);
  57. return image3;
  58. }
  59.  
  60. public CharSequence getTitle() {
  61. return Game.i.localeManager.i18n.get("item_title_ACCELERATOR");
  62. }
  63.  
  64. public CharSequence getDescription() {
  65. return Game.i.localeManager.i18n.get("item_description_ACCELERATOR");
  66. }
  67.  
  68. public RarityType getRarity() {
  69. return RarityType.VERY_RARE;
  70. }
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement