How can I get properties from an object in Codea? And, additionally, how can I define my own for it?
Let’s say I have two ellipses and I want to reuse the position of the first, on the second one.
In Gideros Mobile, for example, I would do something like:<pre lang="lua>local ellipse1 = ellipse( 0, 0, 100 ) local ellipse2 = ellipse( ellipse1:getX(), ellipse1:getY(), 200 ) ``` PS: I know I could make variables hold the position and assign them to both ellipses, but I would like to read them as properties directly from the object itself. I want to be able to <b>speak</b> directly to each object! But as far as I can see, the ellipse function doesn't return anything to be assigned to a variable and hold any props. Would I have to make a Class and make then instances of it?