Class: Battle::Visual::HPAnimation

Inherits:
Yuki::Animation::DiscreetAnimation show all
Defined in:
docs/5_Battle_02_Visual.rb

Overview

Animation of HP getting down/up

Instance Attribute Summary

Attributes inherited from Yuki::Animation::TimedAnimation

#begin_time, #end_time, #parallel_animations, #root, #sub_animation, #time_source

Instance Method Summary collapse

Methods inherited from Yuki::Animation::DiscreetAnimation

#start

Methods inherited from Yuki::Animation::TimedAnimation

#in_parallel_of, #parallel_add, #play_before, #resolver=, #start

Constructor Details

#initialize(scene, target, quantity, effectiveness = nil) ⇒ HPAnimation

Create the HP Animation

Parameters:

  • scene (Battle::Scene)

    scene responsive of holding all the battle information

  • target (PFM::PokemonBattler)

    Pokemon getting its HP down/up

  • quantity (Integer)

    quantity of HP the Pokemon is getting

  • effectiveness (Integer, nil) (defaults to: nil)

    optional param to play the effectiveness sound if that comes from using a move



432
433
# File 'docs/5_Battle_02_Visual.rb', line 432

def initialize(scene, target, quantity, effectiveness = nil)
end

Instance Method Details

#done?Boolean

Detect if the animation if done

Returns:

  • (Boolean)


439
440
# File 'docs/5_Battle_02_Visual.rb', line 439

def done?
end

#effectiveness_sound(effectiveness)

Play the effectiveness sound



442
443
# File 'docs/5_Battle_02_Visual.rb', line 442

def effectiveness_sound(effectiveness)
end

#update

Update the animation



435
436
# File 'docs/5_Battle_02_Visual.rb', line 435

def update
end