Reputation: 57
I'm placing all 4 items from an array graphics
, then moving three of them.
Besides a for loop, is there a shorter way to place the entire array graphics
at the same position? i.e. How do I place an entire array at a single point?
// Position a graphic in each quadrant.
for i in 0 ... 3 {
scene.place(graphics[i], at: Point(x: x, y: y))
}
graphics[1].move(to: Point(x: x, y: -y), duration: 2)
graphics[2].move(to: Point(x: -x, y: -y), duration: 2)
graphics[3].move(to: Point(x: -x, y: y), duration: 2)
Upvotes: 2
Views: 59