Drawing Lines without using a Canvas Actor
Posted: Tue May 16, 2006 10:18 pm
Hi everyone,
I was wondering if anyone knows how to draw a line between two actors without using a canvas.
For example, let's say you've got some moveable units and you want to let the user set their destination when they are tapped on with the stylus (and you also want to let the user check on a given unit's destination by clicking on it). The most obvious way to do this is by drawing a line from the unit to its destination.
The only way I can think of doing this so far is by creating a canvas and setting its visibility state to "DISABLE" when it's created, and then enabling it when the user taps on a unit. But there must be a less cumbersome way right? Also, isn't the line drawn from the upper left hand corner of the event actor (which would make this approach impractical)?
Thanks in advance!
I was wondering if anyone knows how to draw a line between two actors without using a canvas.
For example, let's say you've got some moveable units and you want to let the user set their destination when they are tapped on with the stylus (and you also want to let the user check on a given unit's destination by clicking on it). The most obvious way to do this is by drawing a line from the unit to its destination.
The only way I can think of doing this so far is by creating a canvas and setting its visibility state to "DISABLE" when it's created, and then enabling it when the user taps on a unit. But there must be a less cumbersome way right? Also, isn't the line drawn from the upper left hand corner of the event actor (which would make this approach impractical)?
Thanks in advance!