Module: Yuki::Transitions

Defined in:
docs/01500_Yuki.rb

Overview

Module that display various transitions on the screen

Constant Summary collapse

NB_Frame =

The number of frame the transition takes to display

60
Directed_Angles =

Hash that give the angle according to the direction of the player

{-8 => 0, 8 => 180, -4 => 90, 4 => 270, -2 => 180, 2 => 0, -6 => 270, 6 => 90}
Directed_X =

Hash that give x factor (* w/2)

{-8 => 1, 8 => 1, -4 => -2, 4 => 0, -2 => 1, 2 => 1, -6 => 4, 6 => 2}
Directed_Y =

Hash that give the y factor (* w/2)

{-8 => -2, 8 => 0, -4 => 1, 4 => 1, -2 => 4, 2 => 2, -6 => 1, 6 => 1}

Class Method Summary collapse

Class Method Details

.bw_zoom(transition_sprite)

Display a BW in->out Transition

Parameters:

  • transition_sprite (Sprite)

    a screenshot sprite



461
462
# File 'docs/01500_Yuki.rb', line 461

def bw_zoom(transition_sprite)
end

.circular(direction = -1))

Note:

A block can be yield if given, its parameter is i (frame) and sp1 (the screenshot)

Show a circular transition (circle reduce it size or increase it)

Parameters:

  • direction (-1, 1) (defaults to: -1))

    -1 = out -> in, 1 = in -> out



435
436
# File 'docs/01500_Yuki.rb', line 435

def circular(direction = -1)
end

.directed(direction = -1))

Note:

A block can be yield if given, its parameter is i (frame) and sp1 (the screenshot)

Transition that goes from up -> down or right -> left

Parameters:

  • direction (-1, 1) (defaults to: -1))

    -1 = out -> in, 1 = in -> out



449
450
# File 'docs/01500_Yuki.rb', line 449

def directed(direction = -1)
end

.dispose_sprites(*args)

Dispose the sprites

Parameters:



468
469
# File 'docs/01500_Yuki.rb', line 468

def dispose_sprites(*args)
end

.update_graphics_60_fps

TODO: rework all animations to rely on Yuki::Animation instead of using that dirty trick



464
465
# File 'docs/01500_Yuki.rb', line 464

def update_graphics_60_fps
end

.weird_transition(nb_frame = 60, radius = 0.25, max_alpha = 0.5, min_tau = 0.07, delta_tau = 0.07, bitmap: nil)

Display a weird transition (for battle)

Parameters:

  • nb_frame (Integer) (defaults to: 60)

    the number of frame used for the transition

  • radius (Float) (defaults to: 0.25)

    the radius (in texture uv) of the transition effect

  • max_alpha (Float) (defaults to: 0.5)

    the maxium alpha value for the transition effect

  • min_tau (Float) (defaults to: 0.07)

    the minimum tau value of the transition effect

  • delta_tau (Float) (defaults to: 0.07)

    the derivative of tau between the begining and the end of the transition



457
458
# File 'docs/01500_Yuki.rb', line 457

def weird_transition(nb_frame = 60, radius = 0.25, max_alpha = 0.5, min_tau = 0.07, delta_tau = 0.07, bitmap: nil)
end