View Javadoc

1   package erland.game.tileadventure;
2   
3   import erland.util.ParameterSerializable;
4   import erland.util.ParameterValueStorageExInterface;
5   import erland.util.StringUtil;
6   
7   /*
8    * Copyright (C) 2004 Erland Isaksson (erland_i@hotmail.com)
9    *
10   * This program is free software; you can redistribute it and/or
11   * modify it under the terms of the GNU General Public License
12   * as published by the Free Software Foundation; either version 2
13   * of the License, or (at your option) any later version.
14   *
15   * This program is distributed in the hope that it will be useful,
16   * but WITHOUT ANY WARRANTY; without even the implied warranty of
17   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18   * GNU General Public License for more details.
19   *
20   * You should have received a copy of the GNU General Public License
21   * along with this program; if not, write to the Free Software
22   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23   * 
24   */
25  
26  public class MapObjectExtendedLevelInfo implements ParameterSerializable {
27      private Boolean walkable = Boolean.FALSE;
28      private Boolean pushable = Boolean.FALSE;
29  
30      public void write(ParameterValueStorageExInterface out) {
31          out.setParameter("walkable",walkable.toString());
32          out.setParameter("pushable",pushable.toString());
33      }
34  
35      public void read(ParameterValueStorageExInterface in) {
36          walkable = StringUtil.asBoolean(in.getParameter("walkable"),Boolean.FALSE);
37          pushable = StringUtil.asBoolean(in.getParameter("pushable"),Boolean.FALSE);
38      }
39  
40      public void setWalkable(Boolean walkable) {
41          this.walkable = walkable;
42      }
43  
44      public void setPushable(Boolean pushable) {
45          this.pushable = pushable;
46      }
47  
48      public Boolean getWalkable() {
49          return walkable;
50      }
51  
52      public Boolean getPushable() {
53          return pushable;
54      }
55  }