BeingManager Class Reference

#include <beingmanager.h>

List of all members.


Detailed Description

Definition at line 32 of file beingmanager.h.


Public Member Functions

 BeingManager ()
 ~BeingManager ()
void setMap (Map *map)
 Sets the map on which beings are created.
void setPlayer (LocalPlayer *player)
 Sets the current player.
BeingcreateBeing (int id, Being::Type type, int subtype)
 Create a being and add it to the list of beings.
void destroyBeing (Being *being)
 Remove a Being.
BeingfindBeing (int id) const
 Returns a specific id Being.
BeingfindBeing (int x, int y, Being::Type type=Being::UNKNOWN) const
 Returns a being at specific coordinates.
BeingfindBeingByPixel (int x, int y) const
BeingfindNearestLivingBeing (int x, int y, int maxdist, Being::Type type=Being::UNKNOWN) const
 Returns a being nearest to specific coordinates.
BeingfindBeingByName (const std::string &name, Being::Type type=Being::UNKNOWN) const
 Finds a being by name and (optionally) by type.
BeingfindNearestLivingBeing (Being *aroundBeing, int maxdist, Being::Type type=Being::UNKNOWN) const
 Returns a being nearest to another being.
const BeingsgetAll () const
 Returns the whole list of beings.
bool hasBeing (Being *being) const
 Returns true if the given being is in the manager's list, false otherwise.
void logic ()
 Performs being logic and deletes dead beings when they have been dead long enough.
void clear ()
 Destroys all beings except the local player.

Protected Attributes

Beings mBeings
MapmMap

Constructor & Destructor Documentation

BeingManager::BeingManager (  ) 

Definition at line 59 of file beingmanager.cpp.

BeingManager::~BeingManager (  ) 

Definition at line 63 of file beingmanager.cpp.


Member Function Documentation

void BeingManager::setMap ( Map map  ) 

Sets the map on which beings are created.

Definition at line 68 of file beingmanager.cpp.

void BeingManager::setPlayer ( LocalPlayer player  ) 

Sets the current player.

Definition at line 75 of file beingmanager.cpp.

Being * BeingManager::createBeing ( int  id,
Being::Type  type,
int  subtype 
)

Create a being and add it to the list of beings.

Definition at line 81 of file beingmanager.cpp.

void BeingManager::destroyBeing ( Being being  ) 

Remove a Being.

Definition at line 107 of file beingmanager.cpp.

Being * BeingManager::findBeing ( int  id  )  const

Returns a specific id Being.

Definition at line 117 of file beingmanager.cpp.

Being * BeingManager::findBeing ( int  x,
int  y,
Being::Type  type = Being::UNKNOWN 
) const

Returns a being at specific coordinates.

Definition at line 129 of file beingmanager.cpp.

Being * BeingManager::findBeingByPixel ( int  x,
int  y 
) const

Definition at line 141 of file beingmanager.cpp.

Being * BeingManager::findNearestLivingBeing ( int  x,
int  y,
int  maxdist,
Being::Type  type = Being::UNKNOWN 
) const

Returns a being nearest to specific coordinates.

Parameters:
x X coordinate.
y Y coordinate.
maxdist Maximal distance. If minimal distance is larger, no being is returned.
type The type of being to look for.

Definition at line 221 of file beingmanager.cpp.

Being * BeingManager::findBeingByName ( const std::string &  name,
Being::Type  type = Being::UNKNOWN 
) const

Finds a being by name and (optionally) by type.

Definition at line 167 of file beingmanager.cpp.

Being * BeingManager::findNearestLivingBeing ( Being aroundBeing,
int  maxdist,
Being::Type  type = Being::UNKNOWN 
) const

Returns a being nearest to another being.

Parameters:
maxdist maximal distance. If minimal distance is larger, no being is returned

Definition at line 264 of file beingmanager.cpp.

const Beings & BeingManager::getAll (  )  const

Returns the whole list of beings.

Definition at line 181 of file beingmanager.cpp.

bool BeingManager::hasBeing ( Being being  )  const

Returns true if the given being is in the manager's list, false otherwise.

Parameters:
being the being to search for

Definition at line 303 of file beingmanager.cpp.

void BeingManager::logic (  ) 

Performs being logic and deletes dead beings when they have been dead long enough.

Definition at line 186 of file beingmanager.cpp.

void BeingManager::clear (  ) 

Destroys all beings except the local player.

Definition at line 209 of file beingmanager.cpp.


Member Data Documentation

Definition at line 122 of file beingmanager.h.

Map* BeingManager::mMap [protected]

Definition at line 123 of file beingmanager.h.


The documentation for this class was generated from the following files:

Generated on Sun Apr 26 17:30:43 2009 for The Mana World by  doxygen 1.5.5