|
|
|
Here you can see how we have broken up the initialization or “go home” code into a broadcast receiver for “reset girl sprite”. This means we can call this code anytime we need to by sending out this message. One other example of using this here is when we receive the “end of game” message, our own sprite can respond to this by resetting itself back to the “home” state. I hope you enjoyed this article; if you have any feedback or thoughts please leave them in the comment section below! |