mdh.hephaestus2
Class Block

java.lang.Object
  |
  +--mdh.hephaestus2.Stuff
        |
        +--mdh.hephaestus2.Thing
              |
              +--mdh.hephaestus2.Block
All Implemented Interfaces:
Serializable

public final class Block
extends Thing

A stationary object. Blocks are 'blocking' by default, and have no other special attributes. Setting a trigger callback on a Block is particularly useful for building switches, shop counters, etc.

Author:
Copyright © 2001 by Mark Hughes <kamikaze@kuoi.asui.uidaho.edu>
See Also:
Serialized Form

Constructor Summary
Block(String name)
          Creates a new Block.
 
Method Summary
 int getType()
          Returns the type constant for this object, one of Global.TYPE_*.
 boolean isType(int type)
          Returns true if this class or any of its superclasses is of 'type', one of Global.TYPE_*.
 
Methods inherited from class mdh.hephaestus2.Thing
findGrid, findMap, getIconFilename, getNPoses, getOpacity, getPose, getProps, getTile, initProps, loc, moveto, moveto, setFacing, setOpacity, setPose, setTile
 
Methods inherited from class mdh.hephaestus2.Stuff
destroy, getBlocking, getName, getTriggerCallback, id, setBlocking, setName, setTriggerCallback, toString, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Block

public Block(String name)
      throws HephaestusException
Creates a new Block. This gives the Block a new unique ID and adds it to the database.

Parameters:
name - Human-readable name to show in descriptions. Names do not have to be unique, but should be kept fairly short so they can fit in menus. Null names are not allowed.
Method Detail

getType

public int getType()
Description copied from class: Stuff
Returns the type constant for this object, one of Global.TYPE_*.

Specified by:
getType in class Stuff

isType

public boolean isType(int type)
Description copied from class: Stuff
Returns true if this class or any of its superclasses is of 'type', one of Global.TYPE_*.

Overrides:
isType in class Thing