Class: UI::VoltorbFlip::MemoTile
- Inherits:
-
Sprite
- Object
- LiteRGSS::Disposable
- LiteRGSS::Drawable
- LiteRGSS::Sprite
- LiteRGSS::ShaderedSprite
- Sprite
- UI::VoltorbFlip::MemoTile
- Defined in:
- scripts/01450 Systems/09000 Games/00002 VoltorbFlip/02200 VoltorbFlipSprites.rb
Overview
Memo tiles in VoltorbFlip game
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
-
#disable
Disable the tile.
-
#enable
Enable the tile.
-
#enabled? ⇒ Boolean
Tell if the tile is enabled.
-
#initialize(viewport, index) ⇒ MemoTile
constructor
Create a new MemoTile.
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, index) ⇒ MemoTile
Create a new MemoTile
155 156 157 158 159 160 |
# File 'scripts/01450 Systems/09000 Games/00002 VoltorbFlip/02200 VoltorbFlipSprites.rb', line 155 def initialize(, index) super() @index = index set_bitmap('voltorbflip/memo_tiles', :interface) disable end |
Instance Method Details
#disable
Disable the tile
174 175 176 |
# File 'scripts/01450 Systems/09000 Games/00002 VoltorbFlip/02200 VoltorbFlipSprites.rb', line 174 def disable set_rect_div(@index, 0, 4, 2) end |
#enable
Enable the tile
169 170 171 |
# File 'scripts/01450 Systems/09000 Games/00002 VoltorbFlip/02200 VoltorbFlipSprites.rb', line 169 def enable set_rect_div(@index, 1, 4, 2) end |
#enabled? ⇒ Boolean
Tell if the tile is enabled
164 165 166 |
# File 'scripts/01450 Systems/09000 Games/00002 VoltorbFlip/02200 VoltorbFlipSprites.rb', line 164 def enabled? return src_rect.y > 0 end |