Class: LiteRGSS::SpriteMap
- Inherits:
-
Drawable
- Object
- Disposable
- Drawable
- LiteRGSS::SpriteMap
- Defined in:
- LiteRGSS.rb.yard.rb
Overview
Class that allow to draw tiles on a row
Direct Known Subclasses
Instance Attribute Summary collapse
-
#__index__ ⇒ Integer
readonly
Return the SpriteMap “index”.
-
#ox ⇒ Numeric
Origin X.
-
#oy ⇒ Numeric
Origin Y.
-
#tile_scale ⇒ Numeric
Scale of each tiles in the SpriteMap.
-
#viewport ⇒ Viewport
readonly
Viewport used to draw the row.
-
#x ⇒ Numeric
X position.
-
#y ⇒ Numeric
Y position.
-
#z ⇒ Integer
Z index.
Class Method Summary collapse
-
.new(viewport, tile_width, tile_count)
Create a new SpriteMap.
Instance Method Summary collapse
-
#reset
Clear the SpriteMap.
-
#set(index, bitmap, rect)
Set the tile to draw at a certain position in the row.
-
#set_origin(ox, oy) ⇒ self
Set the origin of the textures of the SpriteMap.
-
#set_position(x, y) ⇒ self
Set the position of the SpriteMap.
- #set_rect(index, x, y, width, height)
Methods inherited from Disposable
Instance Attribute Details
#__index__ ⇒ Integer (readonly)
Return the SpriteMap “index”
751 752 753 |
# File 'LiteRGSS.rb.yard.rb', line 751 def __index__ @__index__ end |
#ox ⇒ Numeric
Returns origin X.
745 746 747 |
# File 'LiteRGSS.rb.yard.rb', line 745 def ox @ox end |
#oy ⇒ Numeric
Returns origin Y.
747 748 749 |
# File 'LiteRGSS.rb.yard.rb', line 747 def oy @oy end |
#tile_scale ⇒ Numeric
Returns scale of each tiles in the SpriteMap.
749 750 751 |
# File 'LiteRGSS.rb.yard.rb', line 749 def tile_scale @tile_scale end |
#viewport ⇒ Viewport (readonly)
Returns viewport used to draw the row.
737 738 739 |
# File 'LiteRGSS.rb.yard.rb', line 737 def @viewport end |
#x ⇒ Numeric
Returns X position.
739 740 741 |
# File 'LiteRGSS.rb.yard.rb', line 739 def x @x end |
#y ⇒ Numeric
Returns Y position.
741 742 743 |
# File 'LiteRGSS.rb.yard.rb', line 741 def y @y end |
#z ⇒ Integer
Returns Z index.
743 744 745 |
# File 'LiteRGSS.rb.yard.rb', line 743 def z @z end |
Class Method Details
.new(viewport, tile_width, tile_count)
Create a new SpriteMap
695 696 697 |
# File 'LiteRGSS.rb.yard.rb', line 695 def self.new(, tile_width, tile_count) end |
Instance Method Details
#reset
Clear the SpriteMap
713 714 715 |
# File 'LiteRGSS.rb.yard.rb', line 713 def reset end |
#set(index, bitmap, rect)
Set the tile to draw at a certain position in the row
720 721 722 |
# File 'LiteRGSS.rb.yard.rb', line 720 def set(index, bitmap, rect) end |
#set_origin(ox, oy) ⇒ self
Set the origin of the textures of the SpriteMap
709 710 711 |
# File 'LiteRGSS.rb.yard.rb', line 709 def set_origin(ox, oy) end |
#set_position(x, y) ⇒ self
Set the position of the SpriteMap
702 703 704 |
# File 'LiteRGSS.rb.yard.rb', line 702 def set_position(x, y) end |
#set_rect(index, x, y, width, height)
725 726 727 |
# File 'LiteRGSS.rb.yard.rb', line 725 def set_rect(index, rect) end |