Class: UI::MiningGame::Tool_Sprite

Inherits:
SpriteSheet show all
Defined in:
docs/01450_Systems_08001_Mining_Game.rb

Overview

Class describing the Tool_Sprite object

Direct Known Subclasses

Tool_Hit_Sprite

Instance Attribute Summary collapse

Attributes inherited from SpriteSheet

#nb_x, #nb_y, #sx, #sy

Attributes inherited from LiteRGSS::ShaderedSprite

#blendmode, #shader

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

Methods inherited from SpriteSheet

#bitmap=, #resize, #select

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

#dispose, #disposed?

Constructor Details

#initialize(viewport) ⇒ Tool_Sprite

Create the Tool_Sprite



577
578
# File 'docs/01450_Systems_08001_Mining_Game.rb', line 577

def initialize(viewport)
end

Instance Attribute Details

#toolSymbol

Returns the symbol of the currently used tool.

Returns:

  • (Symbol)

    the symbol of the currently used tool



575
576
577
# File 'docs/01450_Systems_08001_Mining_Game.rb', line 575

def tool
  @tool
end

Instance Method Details

#add_to_x(nb)

Increase x attribute by nb

Parameters:

  • nb (Integer)


581
582
# File 'docs/01450_Systems_08001_Mining_Game.rb', line 581

def add_to_x(nb)
end

#add_to_y(nb)

Increase y attribute by nb

Parameters:

  • nb (Integer)


589
590
# File 'docs/01450_Systems_08001_Mining_Game.rb', line 589

def add_to_y(nb)
end

#change_tool(sym_tool)

Change the tool image

Parameters:

  • sym_tool (Symbol)

    the symbol of the currently used tool



600
601
# File 'docs/01450_Systems_08001_Mining_Game.rb', line 600

def change_tool(sym_tool)
end

#new_frame

Set the next frame of the sheet



596
597
# File 'docs/01450_Systems_08001_Mining_Game.rb', line 596

def new_frame
end

#sub_to_x(nb)

Decrease x attribute by nb

Parameters:

  • nb (Integer)


585
586
# File 'docs/01450_Systems_08001_Mining_Game.rb', line 585

def sub_to_x(nb)
end

#sub_to_y(nb)

Decrease y attribute by nb

Parameters:

  • nb (Integer)


593
594
# File 'docs/01450_Systems_08001_Mining_Game.rb', line 593

def sub_to_y(nb)
end