Class: UI::MiningGame::Diggable_Sprite
- Inherits:
-
ShaderedSprite
- Object
- LiteRGSS::Disposable
- LiteRGSS::Drawable
- LiteRGSS::Sprite
- LiteRGSS::ShaderedSprite
- Sprite
- ShaderedSprite
- UI::MiningGame::Diggable_Sprite
- Defined in:
- scripts/01450 Systems/08001 Mining Game/00030 UI_Mining_Game/00002 Diggable_Sprite.rb
Overview
Class that describes the Diggable_Sprite object
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
-
#initialize(viewport, item) ⇒ Diggable_Sprite
constructor
Create the Diggable_Sprite.
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, item) ⇒ Diggable_Sprite
Create the Diggable_Sprite
8 9 10 11 12 13 14 15 16 |
# File 'scripts/01450 Systems/08001 Mining Game/00030 UI_Mining_Game/00002 Diggable_Sprite.rb', line 8 def initialize(, item) super() @item = item set_bitmap(image_path + @item.symbol.to_s, :interface) self.angle = (4 - @item.rotation) * 90 unless @item.rotation == 0 set_origin(*correct_origin) self.x = @item.x * 16 self.y = @item.y * 16 + 32 end |