Class: UI::WeatherSprite
Overview
Class responsible for managing weather animations in the battle scene. This class handles different weather effects and transitions back to a neutral state (:none) after the animation ends.
Defined Under Namespace
Classes: HailAnimation, RainAnimation, SandStormAnimation, SunnyAnimation
Instance Attribute Summary collapse
-
#animation_handler ⇒ Yuki::Animation::Handler{ Symbol => Yuki::Animation::TimedAnimation }
readonly
Animation handler for the weather animations.
-
#current_weather_animation ⇒ WeatherSprite?
readonly
Currently active weather animation.
-
#db_symbol ⇒ Symbol
readonly
Symbol representing the current weather.
Class Method Summary collapse
-
.register(db_symbol, klass)
Registers a new weather class.
-
.registered_class(db_symbol) ⇒ Class<WeatherSprite>
Retrieves the registered class for a specific weather.
Instance Method Summary collapse
-
#done? ⇒ Boolean
Checks if the weather animation is finished.
-
#init_weather_animation
Init the Weather Animation.
-
#initialize(viewport, scene) ⇒ WeatherSprite
constructor
Initializes the WeatherSprite.
-
#show_weather_animation(weather)
Displays the animation for a specific weather type If a weather animation is already playing, it stops the current one before starting the new one.
-
#stop_current_animation
Stops the current weather animation and returns to a neutral state.
-
#update
Updates the WeatherSprite and the animation handler Automatically returns to a neutral state if the current animation is done.
Constructor Details
#initialize(viewport, scene) ⇒ WeatherSprite
Initializes the WeatherSprite
2798 2799 |
# File 'docs/5_Battle_02_Visual.rb', line 2798 def initialize(, scene) end |
Instance Attribute Details
#animation_handler ⇒ Yuki::Animation::Handler{ Symbol => Yuki::Animation::TimedAnimation } (readonly)
Animation handler for the weather animations
2774 2775 2776 |
# File 'docs/5_Battle_02_Visual.rb', line 2774 def animation_handler @animation_handler end |
#current_weather_animation ⇒ WeatherSprite? (readonly)
Currently active weather animation
2780 2781 2782 |
# File 'docs/5_Battle_02_Visual.rb', line 2780 def current_weather_animation @current_weather_animation end |
#db_symbol ⇒ Symbol (readonly)
Symbol representing the current weather
2777 2778 2779 |
# File 'docs/5_Battle_02_Visual.rb', line 2777 def db_symbol @db_symbol end |
Class Method Details
.register(db_symbol, klass)
This method returns an undefined value.
Registers a new weather class
2787 2788 |
# File 'docs/5_Battle_02_Visual.rb', line 2787 def register(db_symbol, klass) end |
.registered_class(db_symbol) ⇒ Class<WeatherSprite>
Retrieves the registered class for a specific weather
2792 2793 |
# File 'docs/5_Battle_02_Visual.rb', line 2792 def registered_class(db_symbol) end |
Instance Method Details
#done? ⇒ Boolean
Checks if the weather animation is finished
2810 2811 |
# File 'docs/5_Battle_02_Visual.rb', line 2810 def done? end |
#init_weather_animation
Init the Weather Animation
2801 2802 |
# File 'docs/5_Battle_02_Visual.rb', line 2801 def init_weather_animation end |
#show_weather_animation(weather)
This method returns an undefined value.
Displays the animation for a specific weather type If a weather animation is already playing, it stops the current one before starting the new one
2816 2817 |
# File 'docs/5_Battle_02_Visual.rb', line 2816 def show_weather_animation(weather) end |
#stop_current_animation
This method returns an undefined value.
Stops the current weather animation and returns to a neutral state
2820 2821 |
# File 'docs/5_Battle_02_Visual.rb', line 2820 def stop_current_animation end |
#update
This method returns an undefined value.
Updates the WeatherSprite and the animation handler Automatically returns to a neutral state if the current animation is done
2806 2807 |
# File 'docs/5_Battle_02_Visual.rb', line 2806 def update end |