C4iOS
C4iOS copied to clipboard
Rotation property doesn't get applied when set in `setup()`
The following works:
override func setup() {
let r = Rectangle(frame: Rect(0, 0, 200, 200))
r.lineWidth = 15.0
let c = Circle(center: Point(), radius: 25)
c.lineWidth = 5.0
r.add(c)
r.center = canvas.center
canvas.add(r)
wait(0.001) {
r.rotation += 1.75 * M_PI
}
}
Resulting in:
However, the following has no effect...
override func setup() {
let r = Rectangle(frame: Rect(0, 0, 200, 200))
r.lineWidth = 15.0
let c = Circle(center: Point(), radius: 25)
c.lineWidth = 5.0
r.add(c)
r.center = canvas.center
canvas.add(r)
r.rotation += 1.75 * M_PI
}
Resulting in: