I have a struct Vector3 in created with C# in a dll which is used by a boo script:
struct Vector3 { float x,y, z; }
And a class Transform:
class Transform
{
public Vector3 position { get { ... } set { ... }}
}
When i write in boo:
Transform transform = Transform ()
transform.position.x += 5
Nothing happens. I presume it will just change the value of the struct and then throw the struct away.
Boo should instead transform the code to something like this:
temp = transform.position;
temp.x += 5
transform.position = temp
struct Point:
public x as int
public y as int
struct Rectangle:
[property(topLeft)]
_top as Point
class Figure:
[property(rect)]
_rect as Rectangle
f = Figure()
f.rect.topLeft.x = 10
assert 10 == f.rect.topLeft.x