Module: Fake3D::Sprite3D

Included in:
BattleUI::Sprite3D, UI::Sprite3D
Defined in:
docs/0_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)

Create a new Sprite3D

Parameters:

  • viewport (Viewport) —

    viewport the sprite is rendered in



1719
1720
# File 'docs/0_Dependencies.rb', line 1719

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)



1729
1730
# File 'docs/0_Dependencies.rb', line 1729

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

#z=(z)

Set the z position of the sprite

Parameters:

  • z (Numeric)


1723
1724
# File 'docs/0_Dependencies.rb', line 1723

def z=(z)
end