Module: Fake3D::Sprite3D

Defined in:
docs/00000_Dependencies.rb

Overview

Module to prepend to one of your Sprite class to make them Fake3D able

Instance Method Summary collapse

Instance Method Details

#initialize(viewport)



1017
1018
# File 'docs/00000_Dependencies.rb', line 1017

def initialize(viewport)
end

#set_position(x, y, z = nil)

Set the position of the sprite

Parameters:

  • x (Integer)

    x position of the sprite (Warning, 0 is most likely the center of the viewport)

  • y (Integer)

    y position of the sprite (Warning, y still goes to the bottom, 0 is most likely the center of the viewport)

  • z (Numeric) (defaults to: nil)

    z position of the sprite (1 is most likely at scale, 2 is smaller, 0 is illegal)



1027
1028
# File 'docs/00000_Dependencies.rb', line 1027

def set_position(x, y, z = nil)
end

#z=(z)

Set the z position of the sprite

Parameters:

  • z (Numeric)


1021
1022
# File 'docs/00000_Dependencies.rb', line 1021

def z=(z)
end