Class: UI::MiningGame::Tiles

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

Overview

Class that describes the Tiles 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, state) ⇒ Tiles

Create the Tiles

Parameters:

  • viewport (Viewport)
  • state (Integer)

    the state the image is initialized on (between 0 and 6)



510
511
# File 'docs/01450_Systems_08001_Mining_Game.rb', line 510

def initialize(viewport, state)
end

Instance Attribute Details

#stateInteger

Returns state of the tile.

Returns:

  • (Integer)

    state of the tile



506
507
508
# File 'docs/01450_Systems_08001_Mining_Game.rb', line 506

def state
  @state
end

Instance Method Details

#lower_state(reason)

Lower the state and update the image in consequence

Parameters:

  • reason (Symbol)

    the reason of lowering



517
518
# File 'docs/01450_Systems_08001_Mining_Game.rb', line 517

def lower_state(reason)
end

#update_sx

Update the state of the sheet



513
514
# File 'docs/01450_Systems_08001_Mining_Game.rb', line 513

def update_sx
end