Class: UI::StatusSprite
- Inherits:
-
SpriteSheet
- Object
- LiteRGSS::Disposable
- LiteRGSS::Drawable
- LiteRGSS::Sprite
- LiteRGSS::ShaderedSprite
- Sprite
- ShaderedSprite
- SpriteSheet
- UI::StatusSprite
- Defined in:
- scripts/01450 Systems/00000 General/00100 UI Generics/00500 HelperSprites.rb
Overview
Sprite that show the status of a Pokemon
Constant Summary collapse
- IMAGE_NAME =
Name of the image in Graphics/Interface
'statuts'
- IMAGE_NAME_DEFAULT =
Name of the image in Graphics/Interface
'statutsen'
- STATE_COUNT =
Number of official states
10
Instance Attribute Summary
Attributes inherited from SpriteSheet
Attributes inherited from LiteRGSS::ShaderedSprite
Attributes inherited from LiteRGSS::Sprite
#__index__, #angle, #bitmap, #height, #mirror, #opacity, #ox, #oy, #src_rect, #viewport, #visible, #width, #x, #y, #z, #zoom, #zoom_x, #zoom_y
Instance Method Summary collapse
-
#data=(pokemon)
Set the Pokemon used to show the status.
-
#initialize(viewport) ⇒ StatusSprite
constructor
Create a new Status Sprite.
Methods inherited from SpriteSheet
Methods inherited from Sprite
#load, #mouse_in?, #set_origin_div, #set_rect, #set_rect_div, #set_z, #simple_mouse_in?, #translate_mouse_coords, #update
Methods inherited from LiteRGSS::Sprite
new, #set_origin, #set_position
Methods inherited from LiteRGSS::Disposable
Constructor Details
#initialize(viewport) ⇒ StatusSprite
Create a new Status Sprite
82 83 84 85 86 87 |
# File 'scripts/01450 Systems/00000 General/00100 UI Generics/00500 HelperSprites.rb', line 82 def initialize() super(, 1, STATE_COUNT) filename = IMAGE_NAME + $options.language filename = IMAGE_NAME_DEFAULT unless RPG::Cache.interface_exist?(filename) set_bitmap(filename, :interface) end |
Instance Method Details
#data=(pokemon)
Set the Pokemon used to show the status
91 92 93 |
# File 'scripts/01450 Systems/00000 General/00100 UI Generics/00500 HelperSprites.rb', line 91 def data=(pokemon) self.sy = pokemon.status if (self.visible = (pokemon ? true : false)) end |