Class: UI::Quest::RewardScreen

Inherits:
SpriteStack show all
Defined in:
docs/4_Systems_800_Quest.rb

Overview

Reward Screen composition

Constant Summary collapse

REWARD_COORDINATE =

Coordinate of all the reward buttons

[[3, 1], [137, 1], [3, 36], [137, 36]]

Constants inherited from SpriteStack

SpriteStack::NO_INITIAL_IMAGE

Instance Attribute Summary

Attributes inherited from SpriteStack

#animated, #data, #moving, #stack, #viewport, #x, #y

Instance Method Summary collapse

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, x, y) ⇒ RewardScreen

Initialize the RewardScreen component

Parameters:

  • viewport (Viewport)
  • x (Integer)
  • y (Integer)


517
518
# File 'docs/4_Systems_800_Quest.rb', line 517

def initialize(viewport, x, y)
end

Instance Method Details

#quest=(quest)

Reload all sub-component with a new quest

Parameters:



525
526
# File 'docs/4_Systems_800_Quest.rb', line 525

def quest=(quest)
end

#scroll_rewards(direction)

Scroll the rewards if there’s more than 4 rewards

Parameters:

  • direction (Symbol)

    :left of :right



521
522
# File 'docs/4_Systems_800_Quest.rb', line 521

def scroll_rewards(direction)
end