add redo function on command pattern

This commit is contained in:
jack.zhang committed 2015-04-15 14:30:21 +08:00
1 parent 33566805ee
commit 120555f740
6 files changed
+46 -4

No files matched your search

@@ -17,6 +17,13 @@ public class InvisibilitySpell extends Command {
}
}
@Override
public void redo() {
if (target != null) {
target.setVisibility(Visibility.INVISIBLE);
}
}
@Override
public String toString() {
return "Invisibility spell";