Class: UI::MiningGame::Diggable_Stack
- Inherits:
-
SpriteStack
- Object
- SpriteStack
- UI::MiningGame::Diggable_Stack
- Defined in:
- scripts/01450 Systems/08001 Mining Game/00030 UI_Mining_Game/00003 Diggable_Stack.rb
Overview
Class that describes the Diggable_Stack
Constant Summary
Constants inherited from SpriteStack
Instance Attribute Summary collapse
-
#iron_arr ⇒ Array<UI::MiningGame::Diggable_Sprite] the array containing every irons' sprite
Array<UI::MiningGame::Diggable_Sprite] the array containing every irons' sprite.
-
#item_arr ⇒ Array<UI::MiningGame::Diggable_Sprite] the array containing every items' sprite
Array<UI::MiningGame::Diggable_Sprite] the array containing every items' sprite.
Attributes inherited from SpriteStack
#animated, #data, #moving, #stack, #viewport, #x, #y
Instance Method Summary collapse
-
#initialize(viewport, item_arr, iron_arr) ⇒ Diggable_Stack
constructor
Create the Diggable_Stack.
Methods inherited from SpriteStack
#[], #add_background, #add_line, #add_text, #anime, #anime_delta_set, #dispose, #each, #execute_anime, #move, #move_to, #opacity, #opacity=, #push, #push_sprite, #set_origin, #set_position, #simple_mouse_in?, #size, #stop_animation, #translate_mouse_coords, #update, #update_animation, #update_position, #visible, #visible=, #with_cache, #with_font, #with_surface, #z, #z=
Constructor Details
#initialize(viewport, item_arr, iron_arr) ⇒ Diggable_Stack
Create the Diggable_Stack
14 15 16 17 18 19 20 |
# File 'scripts/01450 Systems/08001 Mining Game/00030 UI_Mining_Game/00003 Diggable_Stack.rb', line 14 def initialize(, item_arr, iron_arr) super(, initial_x, initial_y) @item_arr = [] @iron_arr = [] item_arr.each { |item| @item_arr.push(Diggable_Sprite.new(@viewport, item)) } iron_arr.each { |obstacle| @iron_arr.push(Diggable_Sprite.new(@viewport, obstacle)) } end |
Instance Attribute Details
#iron_arr ⇒ Array<UI::MiningGame::Diggable_Sprite] the array containing every irons' sprite
Returns Array<UI::MiningGame::Diggable_Sprite] the array containing every irons' sprite.
8 9 10 |
# File 'scripts/01450 Systems/08001 Mining Game/00030 UI_Mining_Game/00003 Diggable_Stack.rb', line 8 def iron_arr @iron_arr end |
#item_arr ⇒ Array<UI::MiningGame::Diggable_Sprite] the array containing every items' sprite
Returns Array<UI::MiningGame::Diggable_Sprite] the array containing every items' sprite.
6 7 8 |
# File 'scripts/01450 Systems/08001 Mining Game/00030 UI_Mining_Game/00003 Diggable_Stack.rb', line 6 def item_arr @item_arr end |