Class: Battle::Visual::HPAnimation

Inherits:
Yuki::Animation::DiscreetAnimation show all
Defined in:
docs/01600_Alpha_25_Battle_Engine_00002_Battle_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



426
427
# File 'docs/01600_Alpha_25_Battle_Engine_00002_Battle_Visual.rb', line 426

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

Instance Method Details

#done?Boolean

Detect if the animation if done

Returns:

  • (Boolean)


433
434
# File 'docs/01600_Alpha_25_Battle_Engine_00002_Battle_Visual.rb', line 433

def done?
end

#effectiveness_sound(effectiveness)

Play the effectiveness sound



436
437
# File 'docs/01600_Alpha_25_Battle_Engine_00002_Battle_Visual.rb', line 436

def effectiveness_sound(effectiveness)
end

#update

Update the animation



429
430
# File 'docs/01600_Alpha_25_Battle_Engine_00002_Battle_Visual.rb', line 429

def update
end