@alexzheng there are scaleX and scaleY. You can't really use scale for consistency, because those both values may be different, and for consistency you can only set one value and get one value, not two values
Well as I said I don't think it is a mistake, because it would have to return two parameters instead of one. If on Lua part it would not do much harm, maybe it has something to do with C part implementation. Or for example it would mess up the tweening. If you would use scale parameter to tween it would only use the first value ignoring the second. And another one, for example using GiderosCodingEasy, it heavily relies on overwriting set/get methods and if there would be the cases, where two parameters returned instead of one, overriding it will get even more complicated.
So is there any specific reason you need this for? as in why you can't use getScale or get("scaleX") and get("scaleY")?
Yes you could if the value is the same. But it is possible to scale x axis on one value, for example 0.75, and scale y acis on another value - 0.5. Then the values are different, and you would need to create a special case to handle those kind of situations.
Comments
You can't really use scale for consistency, because those both values may be different, and for consistency you can only set one value and get one value, not two values
https://sites.google.com/site/xraystudiogame
If on Lua part it would not do much harm, maybe it has something to do with C part implementation.
Or for example it would mess up the tweening. If you would use scale parameter to tween it would only use the first value ignoring the second.
And another one, for example using GiderosCodingEasy, it heavily relies on overwriting set/get methods and if there would be the cases, where two parameters returned instead of one, overriding it will get even more complicated.
So is there any specific reason you need this for? as in why you can't use getScale or get("scaleX") and get("scaleY")?
But was this topic about tweening or about sprite:get('scale') or a simple sprite:getScale()
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
https://sites.google.com/site/xraystudiogame
But it is possible to scale x axis on one value, for example 0.75, and scale y acis on another value - 0.5.
Then the values are different, and you would need to create a special case to handle those kind of situations.