Class: BattleUI::PokemonSprite

Inherits:
ShaderedSprite show all
Includes:
GoingInOut, MultiplePosition
Defined in:
docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb

Overview

Sprite of a Pokemon in the battle

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



581
582
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 581

def initialize(viewport, scene)
end

Instance Attribute Details

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

Get the animation handler



568
569
570
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 568

def animation_handler
  @animation_handler
end

#bankInteger (readonly)

Get the bank of the pokemon shown by the sprite

Returns:

  • (Integer)


574
575
576
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 574

def bank
  @bank
end

#pokemonPFM::PokemonBattler

Get the Pokemon shown by the sprite

Returns:



565
566
567
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 565

def pokemon
  @pokemon
end

#positionInteger (readonly)

Get the position of the pokemon shown by the sprite

Returns:

  • (Integer)


571
572
573
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 571

def position
  @position
end

#sceneBattle::Scene (readonly)

Get the scene linked to this object

Returns:



577
578
579
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 577

def scene
  @scene
end

#selectedBoolean

Tell if the sprite is currently selected

Returns:

  • (Boolean)


562
563
564
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 562

def selected
  @selected
end

Instance Method Details

#bitmap=(bitmap)

Set the bitmap of the sprite

Parameters:



628
629
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 628

def bitmap=(bitmap)
end

#cry(dying = false)

Play the cry of the Pokemon

Parameters:

  • dying (Boolean) (defaults to: false)

    if the Pokemon is dying



596
597
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 596

def cry(dying = false)
end

#done?Boolean

Tell if the sprite animations are done

Returns:

  • (Boolean)


588
589
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 588

def done?
end

#flee_animationYuki::Animation::TimedAnimation

Creates the flee animation



636
637
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 636

def flee_animation
end

#opacity=(opacity)

Set the opacity of the sprite

Parameters:

  • opacity (Integer)


624
625
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 624

def opacity=(opacity)
end

#set_origin(ox, oy) ⇒ self

Set the origin of the sprite & the shadow

Parameters:

  • ox (Numeric)
  • oy (Numeric)

Returns:

  • (self)


602
603
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 602

def set_origin(ox, oy)
end

#set_position(x, y) ⇒ self

Set the position of the sprite

Parameters:

  • x (Numeric)
  • y (Numeric)

Returns:

  • (self)


612
613
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 612

def set_position(x, y)
end

#update

Update the sprite



584
585
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 584

def update
end

#visible=(visible)

Set the visibility of the sprite

Parameters:

  • visible (Boolean)


632
633
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 632

def visible=(visible)
end

#x=(x)

Set the x position of the sprite

Parameters:

  • x (Numeric)


620
621
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 620

def x=(x)
end

#y=(y)

Set the y position of the sprite

Parameters:

  • y (Numeric)


616
617
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 616

def y=(y)
end

#zoom=(zoom)

Set the zoom of the sprite

Parameters:

  • zoom (Float)


606
607
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 606

def zoom=(zoom)
end