Class: BattleUI::TrainerSprite

Overview

Sprite of a Trainer in the battle

Direct Known Subclasses

TrainerSprite3D

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

Attributes inherited from LiteRGSS::ShaderedSprite

#blendmode, #shader

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

Methods included from MultiplePosition

#enemy?

Methods included from GoingInOut

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

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

#dispose, #disposed?

Constructor Details

#initialize(viewport, scene, battler, bank, position, battle_info) ⇒ TrainerSprite

Create a new TrainerSprite

Parameters:



968
969
# File 'docs/5_Battle_01_Scene.rb', line 968

def initialize(viewport, scene, battler, bank, position, battle_info)
end

Instance Attribute Details

#animation_handlerYuki::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

#bankInteger (readonly)

Get the bank of the pokemon shown by the sprite

Returns:

  • (Integer)


953
954
955
# File 'docs/5_Battle_01_Scene.rb', line 953

def bank
  @bank
end

#positionInteger (readonly)

Get the position of the pokemon shown by the sprite

Returns:

  • (Integer)


950
951
952
# File 'docs/5_Battle_01_Scene.rb', line 950

def position
  @position
end

#sceneBattle::Scene (readonly)

Get the scene linked to this object

Returns:



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

Returns:

  • (Boolean)


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

Note:

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

Note:

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