Class: UI::MiningGame::Hit_Counter_Sprite

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

Overview

Class that describes the Hit_Counter_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, reason) ⇒ Hit_Counter_Sprite

Create the Hit_Counter_Sprite

Parameters:

  • viewport (Viewport)

    the viewport of the scene

  • reason (Symbol)

    the symbol corresponding to the Hit_Counter_Sprite number



428
429
# File 'docs/01450_Systems_08001_Mining_Game.rb', line 428

def initialize(viewport, reason)
end

Instance Attribute Details

#reasonSymbol

Returns the symbol corresponding to the Hit_Counter_Sprite number (:first or :not_first).

Returns:

  • (Symbol)

    the symbol corresponding to the Hit_Counter_Sprite number (:first or :not_first)



424
425
426
# File 'docs/01450_Systems_08001_Mining_Game.rb', line 424

def reason
  @reason
end

#stateInteger

Returns the current state.

Returns:

  • (Integer)

    the current state



422
423
424
# File 'docs/01450_Systems_08001_Mining_Game.rb', line 422

def state
  @state
end

Instance Method Details

#change_state

Change the state of the Hit_Counter_Sprite



431
432
# File 'docs/01450_Systems_08001_Mining_Game.rb', line 431

def change_state
end

#number_of_image_yInteger

Return the number of images on a same column

Returns:

  • (Integer)


435
436
# File 'docs/01450_Systems_08001_Mining_Game.rb', line 435

def number_of_image_y
end