Module: BattleUI::HideShow

Included in:
GenericChoice, PlayerChoice::ItemInfo, SkillChoice::MoveDescription
Defined in:
scripts/01600 Alpha 25 Battle Engine/00001 Battle_Scene/00001 BattleUI/00002 HideShow.rb

Overview

Module that implements the Hide & Show animation for each sprites/stacks of the UI

To work this module requires `animation_handler` to return a `Yuki::Animation::Handler` !

You can specify a `hide_show_duration` function to overwrite the duration of this animation

Instance Method Summary collapse

Instance Method Details

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

Get the animation handler

Returns:

  • (Yuki::Animation::Handler{ Symbol => Yuki::Animation::TimedAnimation})


12
13
14
15
16
# File 'scripts/01600 Alpha 25 Battle Engine/00001 Battle_Scene/00001 BattleUI/00002 HideShow.rb', line 12

def show
  delta = hide_show_delta
  animation_handler[:hide_show] = show_animation
  animation_handler[:hide_show].start(delta)
end

#hide

Tell the element to hide from scene



19
20
21
22
23
# File 'scripts/01600 Alpha 25 Battle Engine/00001 Battle_Scene/00001 BattleUI/00002 HideShow.rb', line 19

def hide
  delta = hide_show_delta
  animation_handler[:hide_show] = hide_animation
  animation_handler[:hide_show].start(delta)
end

#show

Tell the element to show in the scene



12
13
14
15
16
# File 'scripts/01600 Alpha 25 Battle Engine/00001 Battle_Scene/00001 BattleUI/00002 HideShow.rb', line 12

def show
  delta = hide_show_delta
  animation_handler[:hide_show] = show_animation
  animation_handler[:hide_show].start(delta)
end