Class: SpriteSheet
- Inherits:
-
ShaderedSprite
- Object
- LiteRGSS::Disposable
- LiteRGSS::Drawable
- LiteRGSS::Sprite
- LiteRGSS::ShaderedSprite
- Sprite
- ShaderedSprite
- SpriteSheet
- Defined in:
- docs/4_Systems_000_General_4_UI_Generics.rb
Overview
SpriteSheet is a class that helps the maker to display a sprite from a Sprite Sheet on the screen
Direct Known Subclasses
BattleUI::PlayerChoice::Button, UI::AttackDummySprite, UI::Bag::BagSprite, UI::CategorySprite, UI::GenderSprite, UI::Hall_of_Fame::Star_Animation, UI::MiningGame::Hit_Counter_Sprite, UI::MiningGame::Tiles, UI::MiningGame::Tool_Sprite, UI::PokemonIconSprite, UI::StatusSprite, UI::Storage::ModeSprite, UI::Storage::SelectionModeSprite, UI::Storage::WinMode, UI::ThrowingBallSprite, UI::Type1Sprite
Instance Attribute Summary collapse
-
#nb_x ⇒ Integer
Return the number of sprite on the x axis of the sheet.
-
#nb_y ⇒ Integer
Return the number of sprite on the y axis of the sheet.
-
#sx ⇒ Integer
Return the x sprite index of the sheet.
-
#sy ⇒ Integer
Return the y sprite index of the sheet.
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
-
#bitmap=(value)
Change the bitmap of the sprite.
-
#initialize(viewport, nb_x, nb_y) ⇒ SpriteSheet
constructor
Create a new SpriteSheet.
-
#resize(nb_x, nb_y)
Redefine the number of cells the sheet supports on both axis.
-
#select(sx, sy) ⇒ self
Select a sprite on the sheet according to its x and y index.
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, nb_x, nb_y) ⇒ SpriteSheet
Create a new SpriteSheet
19 20 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 19 def initialize(, nb_x, nb_y) end |
Instance Attribute Details
#nb_x ⇒ Integer
Return the number of sprite on the x axis of the sheet
5 6 7 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 5 def nb_x @nb_x end |
#nb_y ⇒ Integer
Return the number of sprite on the y axis of the sheet
8 9 10 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 8 def nb_y @nb_y end |
#sx ⇒ Integer
Return the x sprite index of the sheet
11 12 13 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 11 def sx @sx end |
#sy ⇒ Integer
Return the y sprite index of the sheet
14 15 16 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 14 def sy @sy end |
Instance Method Details
#bitmap=(value)
Change the bitmap of the sprite
23 24 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 23 def bitmap=(value) end |
#resize(nb_x, nb_y)
Redefine the number of cells the sheet supports on both axis
36 37 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 36 def resize(nb_x, nb_y) end |
#select(sx, sy) ⇒ self
Select a sprite on the sheet according to its x and y index
50 51 |
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 50 def select(sx, sy) end |