Difference between revisions of "B2.CircleShape.new"
From GiderosMobile
Line 3: | Line 3: | ||
=== Description === | === Description === | ||
<translate><br /> | <translate><br /> | ||
− | Creates a new | + | Creates a new [[b2.CircleShape]] instance and optionally set its center point and radius.<br /> |
− | If this function is called with more than 3 parameters, | + | If this function is called with more than 3 parameters, [[b2.CircleShape]] instance<br /> |
is created and its center point and radius are set. If this function is called without any <br /> | is created and its center point and radius are set. If this function is called without any <br /> | ||
− | paramaters, only | + | paramaters, only [[b2.CircleShape]] instance is created and you should set the center<br /> |
point and radius with [[b2.CircleShape:set]] function.<br /> | point and radius with [[b2.CircleShape:set]] function.<br /> | ||
<br /></translate> | <br /></translate> | ||
Line 17: | Line 17: | ||
'''radius''': (number, optional) <translate>the radius</translate> <br/> | '''radius''': (number, optional) <translate>the radius</translate> <br/> | ||
=== Return values === | === Return values === | ||
− | '''Returns''' (any) <translate>A new | + | '''Returns''' (any) <translate>A new [[b2.CircleShape]] object.</translate><br/> |
− | '''Returns''' (any) <translate>A new | + | '''Returns''' (any) <translate>A new [[b2.CircleShape]] object.</translate><br/> |
Revision as of 13:53, 23 August 2018
Available since: Gideros 2011.6
Description
Creates a new b2.CircleShape instance and optionally set its center point and radius.
If this function is called with more than 3 parameters, b2.CircleShape instance
is created and its center point and radius are set. If this function is called without any
paramaters, only b2.CircleShape instance is created and you should set the center
point and radius with b2.CircleShape:set function.
(any), (any) = b2.CircleShape.new(centerx,centery,radius)
Parameters
centerx: (number, optional) the x coordinate of the center
centery: (number, optional) the y coordinate of the center
radius: (number, optional) the radius
Return values
Returns (any) A new b2.CircleShape object.
Returns (any) A new b2.CircleShape object.