Simple Sample
http://www.java2blog.com/2013/02/observer-design-pattern-in-java.html
Apply for Collision detection:
When Product Samsung available, it notify all Person John and Aaron subcribed to it.
When new box is generated (simple box jump game), it notify all walls in the boards. But the important behavior is that the box will running. When box contact wall, it collidate.
Then box (or wall) notify game manager that box has clash (die/disappear).
Wall ~ Person subcribe to Product new.
Product ~ Box (running box/static box/ jumping box).
All wall as Person has been notified when new product available or new box appear, running.
But when box colidate, only colidated wall need to know about clash ? (beside Game manager)
State of the box (x,y position, direction jump...) need to notify for all wall in game board when box moving ?
Always notify wall when box has tiny change position is awkward ?
Action Jump() is not simple
https://softwareengineering.stackexchange.com/questions/197444/building-a-wordpress-like-filter-system
http://www.java2blog.com/2013/02/observer-design-pattern-in-java.html
Apply for Collision detection:
When Product Samsung available, it notify all Person John and Aaron subcribed to it.
When new box is generated (simple box jump game), it notify all walls in the boards. But the important behavior is that the box will running. When box contact wall, it collidate.
Then box (or wall) notify game manager that box has clash (die/disappear).
Wall ~ Person subcribe to Product new.
Product ~ Box (running box/static box/ jumping box).
All wall as Person has been notified when new product available or new box appear, running.
But when box colidate, only colidated wall need to know about clash ? (beside Game manager)
State of the box (x,y position, direction jump...) need to notify for all wall in game board when box moving ?
Always notify wall when box has tiny change position is awkward ?
Action Jump() is not simple
https://softwareengineering.stackexchange.com/questions/197444/building-a-wordpress-like-filter-system
Comments
Post a Comment