Class: BattleUI::PokemonSprite

Overview

Sprite of a Pokemon in the battle

Direct Known Subclasses

PokemonSprite3D

Constant Summary collapse

DELTA_DEATH_Y =

Constant giving the deat Delta Y (you need to adjust that so your screen animation are OK when Pokemon are KO)

32

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 Shader::CreatureShaderLoader

#find_shader_id, #load_shader, #load_shader_properties

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

Methods inherited from LiteRGSS::Disposable

#dispose, #disposed?

Constructor Details

#initialize(viewport, scene) ⇒ PokemonSprite

Create a new PokemonSprite

Parameters:



585
586
# File 'docs/5_Battle_01_Scene.rb', line 585

def initialize(viewport, scene)
end

Instance Attribute Details

#animation_handlerYuki::Animation::Handler{ Symbol => Yuki::Animation::TimedAnimation} (readonly)

Get the animation handler



572
573
574
# File 'docs/5_Battle_01_Scene.rb', line 572

def animation_handler
  @animation_handler
end

#bankInteger (readonly)

Get the bank of the pokemon shown by the sprite

Returns:

  • (Integer)


578
579
580
# File 'docs/5_Battle_01_Scene.rb', line 578

def bank
  @bank
end

#pokemonPFM::PokemonBattler

Get the Pokemon shown by the sprite

Returns:



569
570
571
# File 'docs/5_Battle_01_Scene.rb', line 569

def pokemon
  @pokemon
end

#positionInteger (readonly)

Get the position of the pokemon shown by the sprite

Returns:

  • (Integer)


575
576
577
# File 'docs/5_Battle_01_Scene.rb', line 575

def position
  @position
end

#sceneBattle::Scene (readonly)

Get the scene linked to this object

Returns:



581
582
583
# File 'docs/5_Battle_01_Scene.rb', line 581

def scene
  @scene
end

#selectedBoolean

Tell if the sprite is currently selected

Returns:

  • (Boolean)


563
564
565
# File 'docs/5_Battle_01_Scene.rb', line 563

def selected
  @selected
end

#temporary_substitute_overwriteBoolean

Tell if the sprite is temporary showed while in the Substitute state

Returns:

  • (Boolean)


566
567
568
# File 'docs/5_Battle_01_Scene.rb', line 566

def temporary_substitute_overwrite
  @temporary_substitute_overwrite
end

Instance Method Details

#bitmap=(bitmap)

Set the bitmap of the sprite

Parameters:



632
633
# File 'docs/5_Battle_01_Scene.rb', line 632

def bitmap=(bitmap)
end

#cry(dying = false)

Play the cry of the Pokemon

Parameters:

  • dying (Boolean) (defaults to: false)

    if the Pokemon is dying



600
601
# File 'docs/5_Battle_01_Scene.rb', line 600

def cry(dying = false)
end

#done?Boolean

Tell if the sprite animations are done

Returns:

  • (Boolean)


592
593
# File 'docs/5_Battle_01_Scene.rb', line 592

def done?
end

#flee_animationYuki::Animation::TimedAnimation

Creates the flee animation



640
641
# File 'docs/5_Battle_01_Scene.rb', line 640

def flee_animation
end

#opacity=(opacity)

Set the opacity of the sprite

Parameters:

  • opacity (Integer)


628
629
# File 'docs/5_Battle_01_Scene.rb', line 628

def opacity=(opacity)
end

#set_origin(ox, oy) ⇒ self

Set the origin of the sprite & the shadow

Parameters:

  • ox (Numeric)
  • oy (Numeric)

Returns:

  • (self)


606
607
# File 'docs/5_Battle_01_Scene.rb', line 606

def set_origin(ox, oy)
end

#set_position(x, y) ⇒ self

Set the position of the sprite

Parameters:

  • x (Numeric)
  • y (Numeric)

Returns:

  • (self)


616
617
# File 'docs/5_Battle_01_Scene.rb', line 616

def set_position(x, y)
end

#substitute_animations_speedFloat

Return the Substitute animations speed

Returns:

  • (Float)


650
651
# File 'docs/5_Battle_01_Scene.rb', line 650

def substitute_animations_speed
end

#switch_from_substitute_animation

Creates the switch from substitute animation



646
647
# File 'docs/5_Battle_01_Scene.rb', line 646

def switch_from_substitute_animation
end

#switch_to_substitute_animation

Creates the switch to substitute animation



643
644
# File 'docs/5_Battle_01_Scene.rb', line 643

def switch_to_substitute_animation
end

#switch_to_substitute_sprite

Directly switch the PokemonSprite appearance to the substitute appearance



657
658
# File 'docs/5_Battle_01_Scene.rb', line 657

def switch_to_substitute_sprite
end

#under_substitute_effect?Boolean

Tell if the Pokemon represented by this sprite is under the effect of Substitute

Returns:

  • (Boolean)


654
655
# File 'docs/5_Battle_01_Scene.rb', line 654

def under_substitute_effect?
end

#update

Update the sprite



588
589
# File 'docs/5_Battle_01_Scene.rb', line 588

def update
end

#visible=(visible)

Set the visibility of the sprite

Parameters:

  • visible (Boolean)


636
637
# File 'docs/5_Battle_01_Scene.rb', line 636

def visible=(visible)
end

#x=(x)

Set the x position of the sprite

Parameters:

  • x (Numeric)


624
625
# File 'docs/5_Battle_01_Scene.rb', line 624

def x=(x)
end

#y=(y)

Set the y position of the sprite

Parameters:

  • y (Numeric)


620
621
# File 'docs/5_Battle_01_Scene.rb', line 620

def y=(y)
end

#zoom=(zoom)

Set the zoom of the sprite

Parameters:

  • zoom (Float)


610
611
# File 'docs/5_Battle_01_Scene.rb', line 610

def zoom=(zoom)
end