Module: RecenterSprite

Overview

Module that allows a sprite to be quickly recenter (useful in a Battle::Visual3D scene)

Instance Method Summary collapse

Instance Method Details

#add_position(offset_x, offset_y)

Add an offset to the current position of the sprite

Parameters:

  • offset_x (Integer) —

    offset to add to the x position

  • offset_y (Integer) —

    offset to add to the y position



9
10
# File 'docs/5_Battle_02_Visual.rb', line 9

def add_position(offset_x, offset_y)
end

#recenter

recenter a sprite according to the dimension of the window



4
5
# File 'docs/5_Battle_02_Visual.rb', line 4

def recenter
end