Module: Yuki::Particles

Defined in:
docs/01450_Systems_00003_Map_Engine.rb

Overview

Module that manage the particle display

Author:

  • Nuri Yuri

Constant Summary collapse

Data =

The particle data

[]
EMPTY =

The empty actions

{max_counter: 1, loop: false, data: []}

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.namedHash{ Symbol => Particle_Object } (readonly)

Return the list of named particles

Returns:



527
528
529
# File 'docs/01450_Systems_00003_Map_Engine.rb', line 527

def named
  @named
end

Class Method Details

.add_building(image, x, y, oy = 0, visible_from1 = false, visible_from2 = false) ⇒ Building_Object

Add a building

Parameters:

  • image (String)

    name of the image in Graphics/Autotiles/

  • x (Integer)

    x coordinate of the building

  • y (Integer)

    y coordinate of the building

  • oy (Integer) (defaults to: 0)

    offset y coordinate of the building in native resolution pixel

  • visible_from1 (Symbol, false) (defaults to: false)

    data parameter (unused there)

  • visible_from2 (Symbol, false) (defaults to: false)

    data parameter (unused there)

Returns:



508
509
# File 'docs/01450_Systems_00003_Map_Engine.rb', line 508

def add_building(image, x, y, oy = 0, visible_from1 = false, visible_from2 = false)
end

.add_named_particle(name, character, particle_tag, params = {})

Add a named particle (particle that has a specific flow)

Parameters:

  • name (Symbol)

    name of the particle to prevent collision

  • character (Game_Character)

    the character on which the particle displays

  • particle_tag (Integer, Symbol)

    identifier of the particle in the hash

  • params (Hash) (defaults to: {})

    additional params for the particle



486
487
# File 'docs/01450_Systems_00003_Map_Engine.rb', line 486

def add_named_particle(name, character, particle_tag, params = {})
end

.add_parallax(image, x, y, z, zoom_x = 1, zoom_y = 1, opacity = 255, blend_type = 0) ⇒ Parallax_Object

Add a parallax

Parameters:

  • image (String)

    name of the image in Graphics/Pictures/

  • x (Integer)

    x coordinate of the parallax from the first pixel of the Map (16x16 tiles /!)

  • y (Integer)

    y coordinate of the parallax from the first pixel of the Map (16x16 tiles /!)

  • z (Integer)

    z superiority in the tile viewport

  • zoom_x (Numeric) (defaults to: 1)

    zoom_x of the parallax

  • zoom_y (Numeric) (defaults to: 1)

    zoom_y of the parallax

  • opacity (Integer) (defaults to: 255)

    opacity of the parallax (0~255)

  • blend_type (Integer) (defaults to: 0)

    blend_type of the parallax (0, 1, 2)

Returns:



498
499
# File 'docs/01450_Systems_00003_Map_Engine.rb', line 498

def add_parallax(image, x, y, z, zoom_x = 1, zoom_y = 1, opacity = 255, blend_type = 0)
end

.add_particle(character, particle_tag, params = {}) ⇒ Particle_Object

Add a particle to the stack

Parameters:

  • character (Game_Character)

    the character on which the particle displays

  • particle_tag (Integer, Symbol)

    identifier of the particle in the hash

  • params (Hash) (defaults to: {})

    additional params for the particle

Returns:



479
480
# File 'docs/01450_Systems_00003_Map_Engine.rb', line 479

def add_particle(character, particle_tag, params = {})
end

.clean_stack

Request to clean the stack



472
473
# File 'docs/01450_Systems_00003_Map_Engine.rb', line 472

def clean_stack
end

.dispose

Dispose each particle



522
523
# File 'docs/01450_Systems_00003_Map_Engine.rb', line 522

def dispose
end

.find_particle(terrain_tag, particle_tag)

Note:

This function will try $game_variables & 0 as terrain_tag if the particle_tag wasn’t found

Function that find the data for a particle according to the terrain_tag & the particle tag

Parameters:

  • terrain_tag (Integer)

    terrain_tag in which the event is

  • particle_tag (Integer, Symbol)

    identifier of the particle in the hash



539
540
# File 'docs/01450_Systems_00003_Map_Engine.rb', line 539

def find_particle(terrain_tag, particle_tag)
end

.init(viewport)

Init the particle display on a new viewport

Parameters:



466
467
# File 'docs/01450_Systems_00003_Map_Engine.rb', line 466

def init(viewport)
end

.ready?Boolean

Tell if the system is ready to work

Returns:

  • (Boolean)


515
516
# File 'docs/01450_Systems_00003_Map_Engine.rb', line 515

def ready?
end

.set_on_teleportation(v)

Tell the particle manager the game is warping the player. Particle will skip the :enter phase.

Parameters:

  • v (Boolean)


519
520
# File 'docs/01450_Systems_00003_Map_Engine.rb', line 519

def set_on_teleportation(v)
end

.update

Update of the particles & stack cleaning if requested



469
470
# File 'docs/01450_Systems_00003_Map_Engine.rb', line 469

def update
end

.viewport

Return the viewport of in which the Particles are shown



511
512
# File 'docs/01450_Systems_00003_Map_Engine.rb', line 511

def viewport
end