Class: UI::Bag::BagSprite
- Inherits:
-
SpriteSheet
- Object
- LiteRGSS::Disposable
- LiteRGSS::Drawable
- LiteRGSS::Sprite
- LiteRGSS::ShaderedSprite
- Sprite
- ShaderedSprite
- SpriteSheet
- UI::Bag::BagSprite
- Defined in:
- docs/4_Systems_103_Bag.rb
Overview
Class that show the bag sprite in the Bag UI
Constant Summary collapse
- POCKET_TRANSLATION =
Array translating real pocket id to sprite piece
[0, 0, 1, 3, 5, 4, 2, 6, 7]
- COORDINATES =
Coordinates of the bag
[71, 103]
Instance Attribute Summary collapse
-
#index ⇒ Integer
The current socket index.
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
-
#animate(target_index)
Start the animation between socket.
-
#done? ⇒ Boolean
Test if the animation is done.
-
#initialize(viewport, pocket_indexes) ⇒ BagSprite
constructor
Create a new Bah Sprite.
-
#mid? ⇒ Boolean
Test if the animation is at the middle of its progression.
-
#update
Update the animation.
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
Methods inherited from LiteRGSS::Sprite
new, #set_origin, #set_position
Methods inherited from LiteRGSS::Disposable
Constructor Details
#initialize(viewport, pocket_indexes) ⇒ BagSprite
Create a new Bah Sprite
249 250 |
# File 'docs/4_Systems_103_Bag.rb', line 249 def initialize(, pocket_indexes) end |
Instance Attribute Details
#index ⇒ Integer
Returns the current socket index.
241 242 243 |
# File 'docs/4_Systems_103_Bag.rb', line 241 def index @index end |
Instance Method Details
#animate(target_index)
Start the animation between socket
255 256 |
# File 'docs/4_Systems_103_Bag.rb', line 255 def animate(target_index) end |
#done? ⇒ Boolean
Test if the animation is done
262 263 |
# File 'docs/4_Systems_103_Bag.rb', line 262 def done? end |
#mid? ⇒ Boolean
Test if the animation is at the middle of its progression
266 267 |
# File 'docs/4_Systems_103_Bag.rb', line 266 def mid? end |
#update
Update the animation
258 259 |
# File 'docs/4_Systems_103_Bag.rb', line 258 def update end |