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

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



1200
1201
# File 'docs/5_Battle_01_Scene.rb', line 1200

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

Instance Attribute Details

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

Get the animation handler



1179
1180
1181
# File 'docs/5_Battle_01_Scene.rb', line 1179

def animation_handler
  @animation_handler
end

#bank ⇒ Integer (readonly)

Get the bank of the pokemon shown by the sprite

Returns:

  • (Integer)


1185
1186
1187
# File 'docs/5_Battle_01_Scene.rb', line 1185

def bank
  @bank
end

#position ⇒ Integer (readonly)

Get the position of the pokemon shown by the sprite

Returns:

  • (Integer)


1182
1183
1184
# File 'docs/5_Battle_01_Scene.rb', line 1182

def position
  @position
end

#scene ⇒ Battle::Scene (readonly)

Get the scene linked to this object

Returns:



1188
1189
1190
# File 'docs/5_Battle_01_Scene.rb', line 1188

def scene
  @scene
end

Instance Method Details

#create_animation

Create the animation



1203
1204
# File 'docs/5_Battle_01_Scene.rb', line 1203

def create_animation
end

#create_shader

Create a shader for the TrainerSprite



1230
1231
# File 'docs/5_Battle_01_Scene.rb', line 1230

def create_shader
end

#done? ⇒ Boolean

Tell if the sprite animations are done

Returns:

  • (Boolean)


1210
1211
# File 'docs/5_Battle_01_Scene.rb', line 1210

def done?
end

#reset_frame

Set the battler back on the first frame



1221
1222
# File 'docs/5_Battle_01_Scene.rb', line 1221

def reset_frame
end

#send_ball_animation

Animation of player scrolling in and out at start of battle



1224
1225
# File 'docs/5_Battle_01_Scene.rb', line 1224

def send_ball_animation
end

#show_next_frame

Note:

Frames are ordered on the vertical axis

Set the battler on its next frame



1214
1215
# File 'docs/5_Battle_01_Scene.rb', line 1214

def show_next_frame
end

#show_previous_frame

Note:

Frames are ordered on the vertical axis

Set the battler on its previous frame



1218
1219
# File 'docs/5_Battle_01_Scene.rb', line 1218

def show_previous_frame
end

#throw_bait_mud_animation

Animation of player throwing a bait or mud at the Pokémon during Safari battles



1227
1228
# File 'docs/5_Battle_01_Scene.rb', line 1227

def throw_bait_mud_animation
end

#update

Update the sprite



1206
1207
# File 'docs/5_Battle_01_Scene.rb', line 1206

def update
end