Module: Yuki::Particles

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



825
826
827
# File 'docs/4_Systems_003_Map_Engine.rb', line 825

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:



806
807
# File 'docs/4_Systems_003_Map_Engine.rb', line 806

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



784
785
# File 'docs/4_Systems_003_Map_Engine.rb', line 784

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:



796
797
# File 'docs/4_Systems_003_Map_Engine.rb', line 796

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:



777
778
# File 'docs/4_Systems_003_Map_Engine.rb', line 777

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

.clean_stack

Request to clean the stack



770
771
# File 'docs/4_Systems_003_Map_Engine.rb', line 770

def clean_stack
end

.dispose

Dispose each particle



820
821
# File 'docs/4_Systems_003_Map_Engine.rb', line 820

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



837
838
# File 'docs/4_Systems_003_Map_Engine.rb', line 837

def find_particle(terrain_tag, particle_tag)
end

.init(viewport)

Init the particle display on a new viewport

Parameters:



764
765
# File 'docs/4_Systems_003_Map_Engine.rb', line 764

def init(viewport)
end

.ready?Boolean

Tell if the system is ready to work

Returns:

  • (Boolean)


813
814
# File 'docs/4_Systems_003_Map_Engine.rb', line 813

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)


817
818
# File 'docs/4_Systems_003_Map_Engine.rb', line 817

def set_on_teleportation(v)
end

.update

Update of the particles & stack cleaning if requested



767
768
# File 'docs/4_Systems_003_Map_Engine.rb', line 767

def update
end

.viewport

Return the viewport of in which the Particles are shown



809
810
# File 'docs/4_Systems_003_Map_Engine.rb', line 809

def viewport
end