Class: UI::Quest::RewardScreen

Inherits:
SpriteStack show all
Defined in:
docs/01450_Systems_08000_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)


474
475
# File 'docs/01450_Systems_08000_Quest.rb', line 474

def initialize(viewport, x, y)
end

Instance Method Details

#quest=(quest)

Reload all sub-component with a new quest

Parameters:



482
483
# File 'docs/01450_Systems_08000_Quest.rb', line 482

def quest=(quest)
end

#scroll_rewards(direction)

Scroll the rewards if there’s more than 4 rewards

Parameters:

  • direction (Symbol)

    :left of :right



478
479
# File 'docs/01450_Systems_08000_Quest.rb', line 478

def scroll_rewards(direction)
end