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)



1160
1161
# File 'docs/4_Systems_003_Map_Engine.rb', line 1160

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

Instance Attribute Details

#disposed ⇒ Boolean (readonly) Also known as: disposed?

If the parallax is disposed

Returns:

  • (Boolean)


1141
1142
1143
# File 'docs/4_Systems_003_Map_Engine.rb', line 1141

def disposed
  @disposed
end

#factor_x ⇒ Numeric

the factor that creates an automatic offset in x

Returns:

  • (Numeric)


1147
1148
1149
# File 'docs/4_Systems_003_Map_Engine.rb', line 1147

def factor_x
  @factor_x
end

#factor_y ⇒ Numeric

the factor that creates an automatic offset in y

Returns:

  • (Numeric)


1150
1151
1152
# File 'docs/4_Systems_003_Map_Engine.rb', line 1150

def factor_y
  @factor_y
end

#sprite ⇒ Sprite

The parallax sprite

Returns:



1144
1145
1146
# File 'docs/4_Systems_003_Map_Engine.rb', line 1144

def sprite
  @sprite
end

Instance Method Details

#dispose

Dispose the parallax



1166
1167
# File 'docs/4_Systems_003_Map_Engine.rb', line 1166

def dispose
end

#update

Update the parallax position



1163
1164
# File 'docs/4_Systems_003_Map_Engine.rb', line 1163

def update
end