Report as inappropriate.
This is an example (with some re-usable classes) of safely implementing actor logic in "sequences" - threads which regularly give up control via method call.
A ThreadActor can have one or more sequences, and in the act() method it processes each sequence. The sequence does whatever it wants to do and then calls waitForNextSequence() to relinquish control to the next sequence (or actor).
The example uploaded here shows an actor with two sequences: one which moves it, and another which rotates it.
Want to leave a comment? You must first log in.
No votes yet.
2012/5/7
2012/5/8
2012/5/9
2012/5/9