Tadimsky/vooga — pull request #33 by wl88 (2013-04-21 23:19:43+00:00)
Title: Fixed Occupy

Occupy is fixed. Yay.

The problem was not in taking parameter for apply(), but that the update() method in Manager failed to distinguish which observer sends it the object (e.g. is it attack or occupy). I adds another differentiator to tell attack and occupy objects apart. I didn't see that error cuz somehow the master version I pulled didn't attack= =. Probably didn't pull correctly lol

It works on my computer but please check again in case anything went wrong. (I first ran master, and now the master features are still there)

And for taking parameter for apply(), I can't really find a way to get around it.. This is because you don't know what unit will be occupying the object, so the unit can only be passed in as the action takes place, instead of as a pre-set in addActions(). I went through the code for Attack, and it doesn't seem to be using Actions yet? Basically they are the same (you are not sure who is attacking whom when pre-setting the actions). If Attack manages to get around it, I can do the same for occupy I guess.