Difference between revisions of "Sprite:hitTestPoint"

From GiderosMobile
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''Available since:''' Gideros 2011.6<br/>
+
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
=== Description ===
+
=== <translate>Description</translate> ===
 
<translate><br />
 
<translate><br />
 
Checks whether the given coordinates (in global coordinate system) is in bounds of the sprite.<br />
 
Checks whether the given coordinates (in global coordinate system) is in bounds of the sprite.<br />
Line 9: Line 9:
 
(bool) = Sprite:hitTestPoint(x,y,shapeFlag)
 
(bool) = Sprite:hitTestPoint(x,y,shapeFlag)
 
</source>
 
</source>
=== Parameters ===
+
=== <translate>Parameters</translate> ===
 
'''x''': (number) <translate></translate> <br/>
 
'''x''': (number) <translate></translate> <br/>
 
'''y''': (number) <translate></translate> <br/>
 
'''y''': (number) <translate></translate> <br/>
 
'''shapeFlag''': (bool) <translate>Take clipping/masking into consideration when testing hit point</translate> '''optional'''<br/>
 
'''shapeFlag''': (bool) <translate>Take clipping/masking into consideration when testing hit point</translate> '''optional'''<br/>
=== Return values ===
+
=== <translate>Return values</translate> ===
'''Returns''' (bool) <translate>[[Special:MyLanguage/true|true]] if the given global coordinates are in bounds of the sprite, [[Special:MyLanguage/false|false]] otherwise.</translate><br/>
+
'''<translate>Returns</translate>''' (bool) <translate>[[Special:MyLanguage/true|true]] if the given global coordinates are in bounds of the sprite, [[Special:MyLanguage/false|false]] otherwise.</translate><br/>

Revision as of 07:27, 24 August 2018

Available since: Gideros 2011.6

Description


Checks whether the given coordinates (in global coordinate system) is in bounds of the sprite.


(bool) = Sprite:hitTestPoint(x,y,shapeFlag)

Parameters

x: (number)
y: (number)
shapeFlag: (bool) Take clipping/masking into consideration when testing hit point optional

Return values

Returns (bool) true if the given global coordinates are in bounds of the sprite, false otherwise.