diff options
Diffstat (limited to 'examples/features/composition.zc')
| -rw-r--r-- | examples/features/composition.zc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/features/composition.zc b/examples/features/composition.zc index 883c348..64fb8e0 100644 --- a/examples/features/composition.zc +++ b/examples/features/composition.zc @@ -21,11 +21,11 @@ struct Rigidbody { fn main() { // Mixin usage - flattened fields - var t = Transform{ x: 10.0, y: 5.0, rotation: 90.0 }; + let t = Transform{ x: 10.0, y: 5.0, rotation: 90.0 }; println "Transform pos: ({t.x}, {t.y})"; // Named usage - nested fields - var rb = Rigidbody{ + let rb = Rigidbody{ position: Vector2{x: 0.0, y: 10.0}, velocity: Vector2{x: 1.0, y: 0.0}, mass: 50.0 |
