add redo function on command pattern
This commit is contained in:
@@ -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";
|
||||
|
Reference in New Issue
Block a user