diff options
Diffstat (limited to 'NET/worlds/scape/SetVisibleBumpableAction.java')
| -rw-r--r-- | NET/worlds/scape/SetVisibleBumpableAction.java | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/NET/worlds/scape/SetVisibleBumpableAction.java b/NET/worlds/scape/SetVisibleBumpableAction.java new file mode 100644 index 0000000..7f0c273 --- /dev/null +++ b/NET/worlds/scape/SetVisibleBumpableAction.java @@ -0,0 +1,109 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class SetVisibleBumpableAction +/* */ extends Action +/* */ { +/* 19 */ public boolean targetBumpable = true; +/* 20 */ public boolean targetVisible = true; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 29 */ Object owner = getOwner(); +/* 30 */ if ((owner == null) || (!(owner instanceof WObject))) { +/* 31 */ return null; +/* */ } +/* 33 */ WObject o = (WObject)owner; +/* */ +/* 35 */ o.setBumpable(this.targetBumpable); +/* 36 */ o.setVisible(this.targetVisible); +/* */ +/* 38 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 48 */ Object ret = null; +/* 49 */ switch (index - offset) { +/* */ case 0: +/* 51 */ if (mode == 0) { +/* 52 */ ret = BooleanPropertyEditor.make( +/* 53 */ new Property(this, index, "Target Bumpable"), +/* 54 */ "No", "Yes"); +/* 55 */ } else if (mode == 1) { +/* 56 */ ret = new Boolean(this.targetBumpable); +/* 57 */ } else if (mode == 2) +/* 58 */ this.targetBumpable = ((Boolean)value).booleanValue(); +/* 59 */ break; +/* */ case 1: +/* 61 */ if (mode == 0) { +/* 62 */ ret = BooleanPropertyEditor.make( +/* 63 */ new Property(this, index, "Target Visible"), +/* 64 */ "No", "Yes"); +/* 65 */ } else if (mode == 1) { +/* 66 */ ret = new Boolean(this.targetVisible); +/* 67 */ } else if (mode == 2) +/* 68 */ this.targetVisible = ((Boolean)value).booleanValue(); +/* 69 */ break; +/* */ default: +/* 71 */ ret = super.properties(index, offset + 2, mode, value); +/* */ } +/* 73 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 79 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 83 */ s.saveVersion(1, classCookie); +/* 84 */ super.saveState(s); +/* */ +/* 86 */ s.saveBoolean(this.targetBumpable); +/* 87 */ s.saveBoolean(this.targetVisible); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 92 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 94 */ super.restoreState(r); +/* */ case 0: +/* 96 */ this.targetBumpable = r.restoreBoolean(); +/* 97 */ this.targetVisible = r.restoreBoolean(); +/* 98 */ break; +/* */ default: +/* 100 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SetVisibleBumpableAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */
\ No newline at end of file |