Class: UI::ResultBanner

Inherits:
SpriteStack show all
Includes:
BattleUI::GoingInOut, UI
Defined in:
docs/6_Contest_01_Scene.rb

Overview

Class that represents the result banner shown at the end of a contest

Constant Summary collapse

[19, 59, 99, 139]
RESULT_BANNER_BACKGROUND =

Result banner's background

Returns:

'contest/result_banner'
RESULT_BANNER_PLACE =

Result banner place sprite

Returns:

'contest/result_place'
RESULT_BANNER_SCORE_BAR =

Result banner score bar

Returns:

'contest/score_bar'

Constants inherited from SpriteStack

SpriteStack::NO_INITIAL_IMAGE

Instance Attribute Summary collapse

Attributes inherited from SpriteStack

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

Instance Method Summary collapse

Methods included from BattleUI::GoingInOut

#go_in, #go_out, #in?, #out?

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_animation, #update_position, #visible, #visible=, #with_cache, #with_font, #with_surface, #z, #z=

Constructor Details

#initialize(viewport, scene, index) ⇒ ResultBanner

Create a new Result Banner

Parameters:

  • viewport (Viewport)
  • scene (Contest::Scene) —

    scene linked to this banner

  • index (Integer) —

    index of the banner (0 ~ 3)



731
732
# File 'docs/6_Contest_01_Scene.rb', line 731

def initialize(viewport, scene, index)
end

Instance Attribute Details

#animation_handler ⇒ Yuki::Animation::Handler{ Symbol => Yuki::AnimationMixin} (readonly)

Get the animation handler



714
715
716
# File 'docs/6_Contest_01_Scene.rb', line 714

def animation_handler
  @animation_handler
end

#index ⇒ Integer (readonly)

Index of the banner

Returns:

  • (Integer)


717
718
719
# File 'docs/6_Contest_01_Scene.rb', line 717

def index
  @index
end

#place_sprite ⇒ Sprite (readonly)

The place sprite of the banner

Returns:



723
724
725
# File 'docs/6_Contest_01_Scene.rb', line 723

def place_sprite
  @place_sprite
end

#scene ⇒ Contest::Scene (readonly)

Get the scene linked to this object

Returns:



720
721
722
# File 'docs/6_Contest_01_Scene.rb', line 720

def scene
  @scene
end

#score ⇒ Integer

The score shown by the banner

Returns:

  • (Integer)


726
727
728
# File 'docs/6_Contest_01_Scene.rb', line 726

def score
  @score
end

Instance Method Details

#create_animation

Create the animation



734
735
# File 'docs/6_Contest_01_Scene.rb', line 734

def create_animation
end

#data=(creature)

Set the Creature to show in the Result Banner

Parameters:



745
746
# File 'docs/6_Contest_01_Scene.rb', line 745

def data=(creature)
end

#done? ⇒ Boolean

Tell if the InfoBox animations are done

Returns:

  • (Boolean)


741
742
# File 'docs/6_Contest_01_Scene.rb', line 741

def done?
end

#go_in_animation ⇒ Yuki::AnimationMixin

Creates the go_in animation



753
754
# File 'docs/6_Contest_01_Scene.rb', line 753

def go_in_animation
end

#go_out_animation ⇒ Yuki::AnimationMixin

Creates the go_out animation



757
758
# File 'docs/6_Contest_01_Scene.rb', line 757

def go_out_animation
end

#score_animation ⇒ Yuki::AnimationMixin

Create the score bar filling animation



761
762
# File 'docs/6_Contest_01_Scene.rb', line 761

def score_animation
end

#show_place(place)

Show the place sprite of the result banner

Parameters:

  • place (Integer) —

    the place to show



749
750
# File 'docs/6_Contest_01_Scene.rb', line 749

def show_place(place)
end

#update

Update the InfoBox



737
738
# File 'docs/6_Contest_01_Scene.rb', line 737

def update
end