Difference between revisions of "Sprite:globalToLocal"

From GiderosMobile
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
 
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
 +
'''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/>
 
=== <translate>Description</translate> ===
 
=== <translate>Description</translate> ===
 
<translate><br />
 
<translate><br />

Revision as of 09:28, 24 August 2018

Available since: Gideros 2011.6
Class: Sprite

Description


Converts the x,y coordinates from the global to the sprite's (local) coordinates.


(number), (number) = Sprite:globalToLocal(x,y)

Parameters

x: (number) x coordinate of the global coordinate.
y: (number) y coordinate of the global coordinate.

Return values

Returns (number) 1. x coordinate relative to the display object.
Returns (number) 2. y coordinate relative to the display object.