Class: BattleUI::TrainerSprite
- Inherits:
-
ShaderedSprite
- Object
- LiteRGSS::Disposable
- LiteRGSS::Drawable
- LiteRGSS::Sprite
- LiteRGSS::ShaderedSprite
- Sprite
- ShaderedSprite
- BattleUI::TrainerSprite
- Includes:
- GoingInOut, MultiplePosition
- Defined in:
- docs/5_Battle_01_Scene.rb
Overview
Sprite of a Trainer in the battle
Direct Known Subclasses
Constant Summary collapse
- FADE_AWAY_PIXEL_COUNT =
Number of pixels the sprite has to move in other to fade away from the scene
160
- BACK_FRAME_COUNT =
Define the number of frames inside a back trainer
2
- DYNAMIC_BACKSPRITES =
Determines the number of frames for a backsprite automatically
true
Instance Attribute Summary collapse
-
#animation_handler ⇒ Yuki::Animation::Handler{ Symbol => Yuki::Animation::TimedAnimation}
readonly
Get the animation handler.
-
#bank ⇒ Integer
readonly
Get the bank of the pokemon shown by the sprite.
-
#position ⇒ Integer
readonly
Get the position of the pokemon shown by the sprite.
-
#scene ⇒ Battle::Scene
readonly
Get the scene linked to this object.
Attributes inherited from LiteRGSS::ShaderedSprite
Attributes inherited from LiteRGSS::Sprite
#__index__, #angle, #bitmap, #height, #mirror, #opacity, #ox, #oy, #src_rect, #viewport, #visible, #width, #x, #y, #z, #zoom, #zoom_x, #zoom_y
Instance Method Summary collapse
-
#done? ⇒ Boolean
Tell if the sprite animations are done.
-
#initialize(viewport, scene, battler, bank, position, battle_info) ⇒ TrainerSprite
constructor
Create a new TrainerSprite.
-
#send_ball_animation
Animation of player scrolling in and out at start of battle.
-
#show_next_frame
Set the battler on its next frame.
-
#show_previous_frame
Set the battler on its previous frame.
-
#update
Update the sprite.
Methods included from MultiplePosition
Methods included from GoingInOut
Methods inherited from Sprite
#load, #mouse_in?, #set_origin_div, #set_rect, #set_rect_div, #set_z, #simple_mouse_in?, #translate_mouse_coords
Methods inherited from LiteRGSS::Sprite
new, #set_origin, #set_position
Methods inherited from LiteRGSS::Disposable
Constructor Details
#initialize(viewport, scene, battler, bank, position, battle_info) ⇒ TrainerSprite
Create a new TrainerSprite
968 969 |
# File 'docs/5_Battle_01_Scene.rb', line 968 def initialize(, scene, battler, bank, position, battle_info) end |
Instance Attribute Details
#animation_handler ⇒ Yuki::Animation::Handler{ Symbol => Yuki::Animation::TimedAnimation} (readonly)
Get the animation handler
947 948 949 |
# File 'docs/5_Battle_01_Scene.rb', line 947 def animation_handler @animation_handler end |
#bank ⇒ Integer (readonly)
Get the bank of the pokemon shown by the sprite
953 954 955 |
# File 'docs/5_Battle_01_Scene.rb', line 953 def bank @bank end |
#position ⇒ Integer (readonly)
Get the position of the pokemon shown by the sprite
950 951 952 |
# File 'docs/5_Battle_01_Scene.rb', line 950 def position @position end |
#scene ⇒ Battle::Scene (readonly)
Get the scene linked to this object
956 957 958 |
# File 'docs/5_Battle_01_Scene.rb', line 956 def scene @scene end |
Instance Method Details
#done? ⇒ Boolean
Tell if the sprite animations are done
975 976 |
# File 'docs/5_Battle_01_Scene.rb', line 975 def done? end |
#send_ball_animation
Animation of player scrolling in and out at start of battle
986 987 |
# File 'docs/5_Battle_01_Scene.rb', line 986 def send_ball_animation end |
#show_next_frame
Frames are ordered on the vertical axis
Set the battler on its next frame
979 980 |
# File 'docs/5_Battle_01_Scene.rb', line 979 def show_next_frame end |
#show_previous_frame
Frames are ordered on the vertical axis
Set the battler on its previous frame
983 984 |
# File 'docs/5_Battle_01_Scene.rb', line 983 def show_previous_frame end |
#update
Update the sprite
971 972 |
# File 'docs/5_Battle_01_Scene.rb', line 971 def update end |