Class: Yuki::Parallax_Object

Inherits:
Object
  • Object
show all
Defined in:
docs/4_Systems_003_Map_Engine.rb

Overview

Object that describe a parallax as a particle

Author:

  • Nuri Yuri

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Creates a new Parallax_Object

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)



992
993
# File 'docs/4_Systems_003_Map_Engine.rb', line 992

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

Instance Attribute Details

#disposedBoolean (readonly) Also known as: disposed?

If the parallax is disposed

Returns:

  • (Boolean)


973
974
975
# File 'docs/4_Systems_003_Map_Engine.rb', line 973

def disposed
  @disposed
end

#factor_xNumeric

the factor that creates an automatic offset in x

Returns:

  • (Numeric)


979
980
981
# File 'docs/4_Systems_003_Map_Engine.rb', line 979

def factor_x
  @factor_x
end

#factor_yNumeric

the factor that creates an automatic offset in y

Returns:

  • (Numeric)


982
983
984
# File 'docs/4_Systems_003_Map_Engine.rb', line 982

def factor_y
  @factor_y
end

#spriteSprite

The parallax sprite

Returns:



976
977
978
# File 'docs/4_Systems_003_Map_Engine.rb', line 976

def sprite
  @sprite
end

Instance Method Details

#dispose

Dispose the parallax



998
999
# File 'docs/4_Systems_003_Map_Engine.rb', line 998

def dispose
end

#update

Update the parallax position



995
996
# File 'docs/4_Systems_003_Map_Engine.rb', line 995

def update
end