wyvern.kernel.motion
Class WaterMover

java.lang.Object
  extended bywyvern.kernel.motion.Mover
      extended bywyvern.kernel.motion.WaterMover
Direct Known Subclasses:
Ship.ShipMover

public class WaterMover
extends Mover

This hacky class for the demo keeps the monster in the water. Eventually it should probably be implemented as an property on the Mover object (e.g. Mover.setPassTerrain()) or something).

Version:
1.0, Dec 03, 1997
Author:
Steve Yegge

Field Summary
 
Fields inherited from class wyvern.kernel.motion.Mover
FASTEST_MOVE_SPEED
 
Constructor Summary
WaterMover()
           
 
Method Summary
 boolean canMove(GameObject agent, Terrain t)
          Returns true if the monster can move onto the specified terrain at all.
 
Methods inherited from class wyvern.kernel.motion.Mover
canWalk, checkAllLocations, checkPreconditions, getInstance, getSpeed, isWater, setNoPassDelay, terrainCheck, terrainCheckBlockedBy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WaterMover

public WaterMover()
Method Detail

canMove

public boolean canMove(GameObject agent,
                       Terrain t)
Returns true if the monster can move onto the specified terrain at all. Monsters may make a subclass of Mover that overrides this method if they want to constrain their movement in some way; e.g. a Shark might have a WaterMover subclass that only lets it move in water-type terrain.

Overrides:
canMove in class Mover
Parameters:
agent - the Monster trying to move there
t - the Terrain to examine