I'm writing a buff class that will have a delegate to the caster and an array of delegates that call the affected objects (can be tiles or sprites). After some research on how to create an NSMutableArray of weak objects, I reached this stack overflow question: http://stackoverflow.com/questions/4692161/non-retaining-array-for-delegates
One of the answers says that for multiple receivers, I should use NSNotificationCenter. So I did some research, but I'm not sure if it's the way I want it to work
What I need is: Once a player places a buff, the caster and the target(s) would get a pointer to this buff. Every object that has a pointer to the buff may send the message to it saying something has interrupted the buff. Once the buff gets the message, it would spread the message to everyone involved in the buff.
Question is: Should I indeed use NSNotificationCenter? Or should I stick to an array of delegates? Or maybe someone has a better idea?