Sprite:get
From GiderosMobile
Available since: Gideros 2011.6
Description
Returns the specified property of this sprite instance by its name. These names are supported:
- `"x"`
- `"y"`
- `"z"`
- `"rotation"`
- `"rotationX"`
- `"rotationY"`
- `"scaleX"`
- `"scaleY"`
- `"scaleZ"`
- `"alpha"`
- `"redMultiplier"`
- `"greenMultiplier"`
- `"blueMultiplier"`
- `"alphaMultiplier"`
- `"anchorX"`
- `"anchorY"`
- `"anchorZ"`
(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<br />
x = sprite:getX()<br />
x = sprite:get("x")<br />
<br />
-- the following two lines do the same thing<br />
y = sprite:getY()<br />
y = sprite:get("y")<br />
<br />
-- the following two lines do the same thing<br />
rotation = sprite:getRotation()<br />
rotation = sprite:get("rotation")<br />
<br />
-- the following two lines do the same thing<br />
scaleX = sprite:getScaleX()<br />
scaleX = sprite:get("scaleX")<br />
<br />
-- the following two lines do the same thing<br />
scaleY = sprite:getScaleY()<br />
scaleY = sprite:get("scaleY")<br />