Module: Yuki::Transitions

Defined in:
docs/4_Systems_003_Map_Engine.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



626
627
# File 'docs/4_Systems_003_Map_Engine.rb', line 626

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



608
609
# File 'docs/4_Systems_003_Map_Engine.rb', line 608

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



622
623
# File 'docs/4_Systems_003_Map_Engine.rb', line 622

def directed(direction = -1)
end

.dispose_sprites(*args)

Dispose the sprites

Parameters:



633
634
# File 'docs/4_Systems_003_Map_Engine.rb', line 633

def dispose_sprites(*args)
end

.update_graphics_60_fps

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



629
630
# File 'docs/4_Systems_003_Map_Engine.rb', line 629

def update_graphics_60_fps
end