Hosting courtesy of Sourceforge

SourceForge Logo
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Game::MoveableItem Class Reference

#include <Moveable.h>

Inheritance diagram for Game::MoveableItem:

Inheritance graph
[legend]
Collaboration diagram for Game::MoveableItem:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual void inch (int amount, Direction d)
virtual Direction getDirection ()
virtual void setDirection (Direction dir)

Detailed Description

Class that controls the position of a picture than can move, but does nothing to actually draw the image. Typically, subclasses will delegate draw to drawAt from a DrawableAt object

Definition at line 57 of file Moveable.h.


Constructor & Destructor Documentation

MoveableItem::MoveableItem Sint16    startX,
Sint16    startY,
int    speed_ = 0
 

Definition at line 55 of file Moveable.cpp.

virtual Game::MoveableItem::~MoveableItem   [virtual]
 

Definition at line 61 of file Moveable.h.


Member Function Documentation

Direction MoveableItem::getDirection   [virtual]
 

Returns:
direction that the item will move if move() is called

Definition at line 71 of file Moveable.cpp.

int MoveableItem::getSpeed   [virtual]
 

Definition at line 63 of file Moveable.cpp.

void MoveableItem::inch int    amount,
Direction    d
[virtual]
 

Changes positon slightly. Note, use setDirection and move() rather than inch() for sustained movement.

Parameters:
amount  number of pixels to move
d  direction to which to move

Definition at line 95 of file Moveable.cpp.

void MoveableItem::lockMovement   [virtual]
 

Definition at line 104 of file Moveable.cpp.

void MoveableItem::move int    amount [virtual]
 

Definition at line 91 of file Moveable.cpp.

void MoveableItem::move   [virtual]
 

Definition at line 87 of file Moveable.cpp.

void MoveableItem::setDirection Direction    newState [virtual]
 

Parameters:
dir  set the direction that the item will move if move() is called

Reimplemented in Game::AbstractPlayer.

Definition at line 75 of file Moveable.cpp.

void MoveableItem::setSpeed int    newSpeed [virtual]
 

Definition at line 67 of file Moveable.cpp.

void MoveableItem::setXpixel Sint16    x [virtual]
 

Definition at line 79 of file Moveable.cpp.

void MoveableItem::setYpixel Sint16    y [virtual]
 

Definition at line 83 of file Moveable.cpp.

void MoveableItem::unlockMovement   [virtual]
 

Definition at line 108 of file Moveable.cpp.


Member Data Documentation

Direction Game::MoveableItem::dir [protected]
 

Definition at line 90 of file Moveable.h.

bool Game::MoveableItem::dirIsLocked [protected]
 

Definition at line 91 of file Moveable.h.

int Game::MoveableItem::speed [protected]
 

Definition at line 89 of file Moveable.h.


The documentation for this class was generated from the following files:
Generated on Tue May 21 07:26:53 2002 for BomberLAN by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001