Class: Contest::Visual
Overview
Class that manages all the things that are visually seen on the screen
Constant Summary collapse
- CONTEST_DEFAULT_BACKGROUND =
Default background for contests
'contestbacks/base'- AUDIENCE_REACTION_SE =
Default audience reaction Sound Effect
['audience_cheer', 75, 100]
Instance Attribute Summary collapse
-
#animations ⇒ Array
readonly
List of the animations.
-
#background ⇒ Sprite
readonly
The background sprite.
-
#camera_positionner
Not used (avoid crash when using MoveAnimation).
-
#contestants ⇒ Array<UI::ContestCreatureSprite>
readonly
List of contestants sprites.
-
#coordinators_with_contestants ⇒ Array<UI::CoordinatorWithContestant>
readonly
List of coordinator with contestants sprites.
-
#curtains ⇒ Array<UI::CurtainSprite>
readonly
The curtains sprites.
-
#info_boxes ⇒ Array<UI::InfoBox>
readonly
The Info boxes UIs.
-
#judge_sprite ⇒ Sprite
readonly
The judge sprite.
-
#lock_info_boxes ⇒ Boolean
Whether to lock the info boxes.
-
#result_banners ⇒ Array<UI::ResultBanner>
readonly
Result banners UIs.
-
#scene ⇒ Contest::Scene
readonly
Get the scene used to instanciate this Visual instance.
-
#skill_choice_ui ⇒ UI::ContestSkillChoice
readonly
The skill choice UI.
-
#target_sprite ⇒ Sprite
readonly
The target sprite.
-
#to_dispose ⇒ Array
readonly
The elements to dispose on #dispose.
-
#viewport ⇒ Viewport
readonly
The viewport used to show the sprites.
-
#viewport_sub ⇒ Viewport
readonly
The viewport used to show some UI part.
Instance Method Summary collapse
-
#add_score_to_box(contestant, score)
Add score to the info box of the given contestant.
-
#announce_results_message
Show the contest results message.
-
#audience_reaction_animation(score, difficulty)
Create the audience reaction animation based on the score and difficulty.
-
#change_enthousiasm(amount)
Change the enthousiasm shown by the judge.
-
#close_curtains
Show the curtains closing animation.
-
#congratulations_message
Show the congratulations message.
-
#contestant_go_in(contestant)
Make a contestant go in.
-
#contestant_go_out(contestant)
Make a contestant go out.
-
#contestant_sprite(creature) ⇒ UI::ContestCreatureSprite
Get the sprite of a creature.
-
#coordinator_in_animation(contestant)
Play the primary judging in animation of a Coordinator with its Contestant sprite.
-
#coordinator_out_animation(contestant)
Play the primary judging out animation of a Coordinator with its Contestant sprite.
-
#dispose
Dispose the visuals.
-
#hide_info_boxes
Hide all the info boxes.
-
#hide_result_banners
Hide all the results banners.
-
#initialize(scene) ⇒ Visual
constructor
Create a new visual instance.
-
#lock
Lock the contest scene.
-
#locking? ⇒ Boolean
Tell if the visual are locking the battle update (for transition purpose).
-
#open_curtains
Show the curtains opening animation.
-
#refresh_info_boxes
Refresh all the info boxes with the new play order.
-
#reset_enthousiasm
Reset the enthousiasm shown by the judge.
-
#scene_update_proc { ... }
Display animation & stuff like that by updating the scene.
-
#show_banner_places_animations
Show the places of the contestants in the result banners.
-
#show_condition_star_animation(contestant)
Show the animation of a condition star appearing on the info box of a contestant.
-
#show_effect_icon_animation(contestant)
Show the animation of an effect icon appearing on the info box of a contestant.
-
#show_info_boxes(no_selection: false)
Show all the info boxes.
-
#show_mega_animation(contestant)
Show the creature mega evolution animation.
-
#show_move_animation(user, move)
Make a move animation.
-
#show_result_banners
Show all the banners.
-
#show_score_animation
Show the score animation of all the banners.
-
#show_skill_choice ⇒ Contest::Move
Method that show the skill choice and store it inside an instance variable.
-
#show_winner_animation
Show the winner animation.
-
#snap_to_bitmaps ⇒ Array<Texture>
Snap all viewports to bitmap.
-
#start_center_animation
Define the translation to the center of the Screen.
-
#to_s
(also: #inspect)
Safe to_s & inspect.
-
#unlock
Unlock the contest scene.
-
#update
Update the visuals.
-
#wait_for_animation
Wait for all animations to end (non parallel ones).
-
#winner_message(contestant)
Show the contest winner message.
Constructor Details
#initialize(scene) ⇒ Visual
Create a new visual instance
56 57 |
# File 'docs/6_Contest_02_Visual.rb', line 56 def initialize(scene) end |
Instance Attribute Details
#animations ⇒ Array (readonly)
List of the animations
12 13 14 |
# File 'docs/6_Contest_02_Visual.rb', line 12 def animations @animations end |
#background ⇒ Sprite (readonly)
The background sprite
24 25 26 |
# File 'docs/6_Contest_02_Visual.rb', line 24 def background @background end |
#camera_positionner
Not used (avoid crash when using MoveAnimation)
53 54 55 |
# File 'docs/6_Contest_02_Visual.rb', line 53 def camera_positionner @camera_positionner end |
#contestants ⇒ Array<UI::ContestCreatureSprite> (readonly)
List of contestants sprites
36 37 38 |
# File 'docs/6_Contest_02_Visual.rb', line 36 def contestants @contestants end |
#coordinators_with_contestants ⇒ Array<UI::CoordinatorWithContestant> (readonly)
List of coordinator with contestants sprites
39 40 41 |
# File 'docs/6_Contest_02_Visual.rb', line 39 def coordinators_with_contestants @coordinators_with_contestants end |
#curtains ⇒ Array<UI::CurtainSprite> (readonly)
The curtains sprites
33 34 35 |
# File 'docs/6_Contest_02_Visual.rb', line 33 def curtains @curtains end |
#info_boxes ⇒ Array<UI::InfoBox> (readonly)
The Info boxes UIs
45 46 47 |
# File 'docs/6_Contest_02_Visual.rb', line 45 def info_boxes @info_boxes end |
#judge_sprite ⇒ Sprite (readonly)
The judge sprite
30 31 32 |
# File 'docs/6_Contest_02_Visual.rb', line 30 def judge_sprite @judge_sprite end |
#lock_info_boxes ⇒ Boolean
Whether to lock the info boxes
48 49 50 |
# File 'docs/6_Contest_02_Visual.rb', line 48 def lock_info_boxes @lock_info_boxes end |
#result_banners ⇒ Array<UI::ResultBanner> (readonly)
Result banners UIs
51 52 53 |
# File 'docs/6_Contest_02_Visual.rb', line 51 def @result_banners end |
#scene ⇒ Contest::Scene (readonly)
Get the scene used to instanciate this Visual instance
9 10 11 |
# File 'docs/6_Contest_02_Visual.rb', line 9 def scene @scene end |
#skill_choice_ui ⇒ UI::ContestSkillChoice (readonly)
The skill choice UI
42 43 44 |
# File 'docs/6_Contest_02_Visual.rb', line 42 def skill_choice_ui @skill_choice_ui end |
#target_sprite ⇒ Sprite (readonly)
The target sprite
27 28 29 |
# File 'docs/6_Contest_02_Visual.rb', line 27 def target_sprite @target_sprite end |
#to_dispose ⇒ Array (readonly)
The elements to dispose on #dispose
21 22 23 |
# File 'docs/6_Contest_02_Visual.rb', line 21 def to_dispose @to_dispose end |
#viewport ⇒ Viewport (readonly)
The viewport used to show the sprites
15 16 17 |
# File 'docs/6_Contest_02_Visual.rb', line 15 def @viewport end |
#viewport_sub ⇒ Viewport (readonly)
The viewport used to show some UI part
18 19 20 |
# File 'docs/6_Contest_02_Visual.rb', line 18 def @viewport_sub end |
Instance Method Details
#add_score_to_box(contestant, score)
Add score to the info box of the given contestant
192 193 |
# File 'docs/6_Contest_02_Visual.rb', line 192 def add_score_to_box(contestant, score) end |
#announce_results_message
Show the contest results message
242 243 |
# File 'docs/6_Contest_02_Visual.rb', line 242 def end |
#audience_reaction_animation(score, difficulty)
Create the audience reaction animation based on the score and difficulty
225 226 |
# File 'docs/6_Contest_02_Visual.rb', line 225 def audience_reaction_animation(score, difficulty) end |
#change_enthousiasm(amount)
Change the enthousiasm shown by the judge
205 206 |
# File 'docs/6_Contest_02_Visual.rb', line 205 def change_enthousiasm(amount) end |
#close_curtains
Show the curtains closing animation
163 164 |
# File 'docs/6_Contest_02_Visual.rb', line 163 def close_curtains end |
#congratulations_message
Show the congratulations message
257 258 |
# File 'docs/6_Contest_02_Visual.rb', line 257 def end |
#contestant_go_in(contestant)
Make a contestant go in
140 141 |
# File 'docs/6_Contest_02_Visual.rb', line 140 def contestant_go_in(contestant) end |
#contestant_go_out(contestant)
Make a contestant go out
144 145 |
# File 'docs/6_Contest_02_Visual.rb', line 144 def contestant_go_out(contestant) end |
#contestant_sprite(creature) ⇒ UI::ContestCreatureSprite
Get the sprite of a creature
176 177 |
# File 'docs/6_Contest_02_Visual.rb', line 176 def contestant_sprite(creature) end |
#coordinator_in_animation(contestant)
Play the primary judging in animation of a Coordinator with its Contestant sprite
216 217 |
# File 'docs/6_Contest_02_Visual.rb', line 216 def coordinator_in_animation(contestant) end |
#coordinator_out_animation(contestant)
Play the primary judging out animation of a Coordinator with its Contestant sprite
220 221 |
# File 'docs/6_Contest_02_Visual.rb', line 220 def coordinator_out_animation(contestant) end |
#dispose
Dispose the visuals
66 67 |
# File 'docs/6_Contest_02_Visual.rb', line 66 def dispose end |
#hide_info_boxes
Hide all the info boxes
180 181 |
# File 'docs/6_Contest_02_Visual.rb', line 180 def hide_info_boxes end |
#hide_result_banners
Hide all the results banners
239 240 |
# File 'docs/6_Contest_02_Visual.rb', line 239 def end |
#lock
Lock the contest scene
75 76 |
# File 'docs/6_Contest_02_Visual.rb', line 75 def lock end |
#locking? ⇒ Boolean
Tell if the visual are locking the battle update (for transition purpose)
69 70 |
# File 'docs/6_Contest_02_Visual.rb', line 69 def locking? end |
#open_curtains
Show the curtains opening animation
166 167 |
# File 'docs/6_Contest_02_Visual.rb', line 166 def open_curtains end |
#refresh_info_boxes
Refresh all the info boxes with the new play order
187 188 |
# File 'docs/6_Contest_02_Visual.rb', line 187 def refresh_info_boxes end |
#reset_enthousiasm
Reset the enthousiasm shown by the judge
208 209 |
# File 'docs/6_Contest_02_Visual.rb', line 208 def reset_enthousiasm end |
#scene_update_proc { ... }
this function raise if the visual are not locked
Display animation & stuff like that by updating the scene
80 81 |
# File 'docs/6_Contest_02_Visual.rb', line 80 def scene_update_proc end |
#show_banner_places_animations
Show the places of the contestants in the result banners
248 249 |
# File 'docs/6_Contest_02_Visual.rb', line 248 def end |
#show_condition_star_animation(contestant)
Show the animation of a condition star appearing on the info box of a contestant
196 197 |
# File 'docs/6_Contest_02_Visual.rb', line 196 def show_condition_star_animation(contestant) end |
#show_effect_icon_animation(contestant)
Show the animation of an effect icon appearing on the info box of a contestant
200 201 |
# File 'docs/6_Contest_02_Visual.rb', line 200 def show_effect_icon_animation(contestant) end |
#show_info_boxes(no_selection: false)
Show all the info boxes
184 185 |
# File 'docs/6_Contest_02_Visual.rb', line 184 def show_info_boxes(no_selection: false) end |
#show_mega_animation(contestant)
Show the creature mega evolution animation
262 263 |
# File 'docs/6_Contest_02_Visual.rb', line 262 def show_mega_animation(contestant) end |
#show_move_animation(user, move)
Make a move animation
171 172 |
# File 'docs/6_Contest_02_Visual.rb', line 171 def show_move_animation(user, move) end |
#show_result_banners
Show all the banners
236 237 |
# File 'docs/6_Contest_02_Visual.rb', line 236 def end |
#show_score_animation
Show the score animation of all the banners
245 246 |
# File 'docs/6_Contest_02_Visual.rb', line 245 def show_score_animation end |
#show_skill_choice ⇒ Contest::Move
Method that show the skill choice and store it inside an instance variable
149 150 |
# File 'docs/6_Contest_02_Visual.rb', line 149 def show_skill_choice end |
#show_winner_animation
Show the winner animation
251 252 |
# File 'docs/6_Contest_02_Visual.rb', line 251 def show_winner_animation end |
#snap_to_bitmaps ⇒ Array<Texture>
Snap all viewports to bitmap
87 88 |
# File 'docs/6_Contest_02_Visual.rb', line 87 def snap_to_bitmaps end |
#start_center_animation
This method is used only in Visual3D
Define the translation to the center of the Screen
91 92 |
# File 'docs/6_Contest_02_Visual.rb', line 91 def start_center_animation end |
#to_s Also known as: inspect
Safe to_s & inspect
59 60 |
# File 'docs/6_Contest_02_Visual.rb', line 59 def to_s end |
#unlock
Unlock the contest scene
72 73 |
# File 'docs/6_Contest_02_Visual.rb', line 72 def unlock end |
#update
Update the visuals
63 64 |
# File 'docs/6_Contest_02_Visual.rb', line 63 def update end |
#wait_for_animation
Wait for all animations to end (non parallel ones)
83 84 |
# File 'docs/6_Contest_02_Visual.rb', line 83 def wait_for_animation end |
#winner_message(contestant)
Show the contest winner message
254 255 |
# File 'docs/6_Contest_02_Visual.rb', line 254 def (contestant) end |