Class: UI::RealHoldSprite
- Inherits:
-
Sprite
- Object
- LiteRGSS::Disposable
- LiteRGSS::Drawable
- LiteRGSS::Sprite
- LiteRGSS::ShaderedSprite
- Sprite
- UI::RealHoldSprite
- Defined in:
- scripts/01450 Systems/00000 General/00100 UI Generics/00500 HelperSprites.rb
Overview
Sprite that show the actual item held if the Pokemon is holding one
Instance Attribute Summary
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 hold image.
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
Instance Method Details
#data=(pokemon)
Set the Pokemon used to show the hold image
124 125 126 127 128 129 130 131 132 |
# File 'scripts/01450 Systems/00000 General/00100 UI Generics/00500 HelperSprites.rb', line 124 def data=(pokemon) if pokemon item_id = ($game_temp.in_battle ? pokemon.battle_item : pokemon.item_holding) || 0 self.visible = item_id != 0 set_bitmap(data_item(item_id).icon, :icon) if visible else self.visible = false end end |