Difference between revisions of "Sprite:get"

From GiderosMobile
Line 6: Line 6:
 
<br />
 
<br />
 
<ul><br />
 
<ul><br />
<li>[[["x"]]]</li><br />
+
<li>[["x"]]</li><br />
<li>[[["y"]]]</li><br />
+
<li>[["y"]]</li><br />
<li>[[["z"]]]</li><br />
+
<li>[["z"]]</li><br />
<li>[[["rotation"]]]</li><br />
+
<li>[["rotation"]]</li><br />
<li>[[["rotationX"]]]</li><br />
+
<li>[["rotationX"]]</li><br />
<li>[[["rotationY"]]]</li><br />
+
<li>[["rotationY"]]</li><br />
<li>[[["scaleX"]]]</li><br />
+
<li>[["scaleX"]]</li><br />
<li>[[["scaleY"]]]</li><br />
+
<li>[["scaleY"]]</li><br />
<li>[[["scaleZ"]]]</li><br />
+
<li>[["scaleZ"]]</li><br />
<li>[[["alpha"]]]</li><br />
+
<li>[["alpha"]]</li><br />
<li>[[["redMultiplier"]]]</li><br />
+
<li>[["redMultiplier"]]</li><br />
<li>[[["greenMultiplier"]]]</li><br />
+
<li>[["greenMultiplier"]]</li><br />
<li>[[["blueMultiplier"]]]</li><br />
+
<li>[["blueMultiplier"]]</li><br />
<li>[[["alphaMultiplier"]]]</li><br />
+
<li>[["alphaMultiplier"]]</li><br />
<li>[[["anchorX"]]]</li><br />
+
<li>[["anchorX"]]</li><br />
<li>[[["anchorY"]]]</li><br />
+
<li>[["anchorY"]]</li><br />
<li>[[["anchorZ"]]]</li><br />
+
<li>[["anchorZ"]]</li><br />
 
</ul><br />
 
</ul><br />
 
<br /></translate>
 
<br /></translate>

Revision as of 14:54, 23 August 2018

Available since: Gideros 2011.6

Description


Returns the specified property of this sprite instance by its name. These names are supported:



(number) = Sprite:get(param)

Parameters

param: (string) The name of the parameter

Return values

Returns (number) The value of the parameter

Examples

Example

-- the following two lines do the same thing
x = sprite:getX()
x = sprite:get(&quot;x&quot;)
	
-- the following two lines do the same thing
y = sprite:getY()
y = sprite:get(&quot;y&quot;)

-- the following two lines do the same thing
rotation = sprite:getRotation()
rotation = sprite:get(&quot;rotation&quot;)

-- the following two lines do the same thing
scaleX = sprite:getScaleX()
scaleX = sprite:get(&quot;scaleX&quot;)

-- the following two lines do the same thing
scaleY = sprite:getScaleY()
scaleY = sprite:get(&quot;scaleY&quot;)