wyvern.lib.classes.games.SideScroller
Class LinkedMovement

java.lang.Object
  extended bywyvern.lib.classes.games.SideScroller.LinkedMovement
All Implemented Interfaces:
HookCallback

public class LinkedMovement
extends java.lang.Object
implements HookCallback

Property to link something's movement with another object.

Version:
1.0, Aug 13, 2002
Author:
Frank Sronce

Field Summary
protected  Commandable linkee_
           
protected  GameMap map_
           
protected  Commandable mover_
           
protected  SideScroller scroller_
           
 
Constructor Summary
LinkedMovement(Commandable linkee, Commandable mover, SideScroller scroller)
          Link one object's movement to another's.
 
Method Summary
 void hookEvent(java.lang.String hookName, CommandEvent eventobj)
          Movement hook handler
 void start()
          Sets up the hooks and such.
 void stop()
          Remove the linkage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

linkee_

protected Commandable linkee_

mover_

protected Commandable mover_

map_

protected GameMap map_

scroller_

protected SideScroller scroller_
Constructor Detail

LinkedMovement

public LinkedMovement(Commandable linkee,
                      Commandable mover,
                      SideScroller scroller)
Link one object's movement to another's.

Parameters:
linkee - the obj who gets moved by others
mover - the obj whose movement the linkee mimics.
Method Detail

start

public void start()
Sets up the hooks and such.


stop

public void stop()
Remove the linkage.


hookEvent

public void hookEvent(java.lang.String hookName,
                      CommandEvent eventobj)
Movement hook handler

Specified by:
hookEvent in interface HookCallback
Parameters:
hookName - hook name
eventobj - the CommandEvent encapsulating the event parameters