![]() |
YAPOG
0.0.1
Yet Another Pokemon Online Game
|
Server side Map. Enabled to send packets to all player inside it. More...
#include <Map.hpp>
Public Member Functions | |
| Map (const yap::ID &id) | |
| virtual | ~Map () |
| void | AddObject (yap::DynamicWorldObject *object) |
| void | RemoveObject (yap::DynamicWorldObject *object) |
| void | RemoveObject (const yap::ID &objectWorldID) |
| void | AddObject (yap::StaticWorldObject *object) |
| void | RemoveObject (yap::StaticWorldObject *object) |
| void | AddPlayer (Player *player) |
| Adds Player player to this Map. | |
| void | RemovePlayer (Player *player) |
| Removes Player player from this Map. | |
| void | SendLoadObjects (yap::IPacket &packet) |
IPacketHandler members. | |
| virtual bool | HandlePacket (yap::IPacket &packet) |
| virtual bool | SendPacket (yap::IPacket &packet) |
| virtual void | AddRelay (yap::IPacketHandler *relay) |
| virtual void | RemoveRelay (yap::IPacketHandler *relay) |
| virtual void | SetParent (yap::IPacketHandler *parent) |
Public Member Functions inherited from yap::Map | |
| const ID & | GetID () const |
| void | SetID (const ID &id) |
| const String & | GetName () const |
| void | SetName (const String &name) |
| const ID & | GetWorldID () const |
| void | SetWorldID (const ID &worldID) |
| const uint & | GetWidth () const |
| const uint & | GetHeight () const |
| void | SetSize (uint width, uint height) |
| const Vector2 & | GetSize () const |
| void | SetCollidableArea (CollidableArea *collidableArea) |
| virtual void | Update (const Time &dt) |
| Makes the object evolve for one frame of the game. | |
| virtual Map * | Clone () const |
Public Member Functions inherited from yap::IUpdateable | |
| virtual | ~IUpdateable () |
Public Member Functions inherited from yap::IIDLoadable | |
| virtual | ~IIDLoadable () |
Public Member Functions inherited from yap::ICloneable | |
| virtual | ~ICloneable () |
Public Member Functions inherited from yap::IPacketHandler | |
| virtual | ~IPacketHandler () |
Private Member Functions | |
| DISALLOW_COPY (Map) | |
| void | HandleOnObjectVelocityChanged (yap::DynamicWorldObject &sender, const yap::Vector2 &oldVelocity, const yap::Vector2 ¤tVelocity) |
| void | HandleOnObjectStateChanged (yap::DynamicWorldObject &sender, const yap::String &oldState, const yap::String ¤tState) |
| void | SendObjectMoveInfo (const yap::DynamicWorldObject &object, const yap::Vector2 &velocity) |
| void | SendUpdateObjectState (const yap::DynamicWorldObject &object, const yap::String &state) |
| void | SendAddObject (const yap::DynamicWorldObject &object) |
| void | SendRemoveObject (const yap::DynamicWorldObject &object) |
Private Attributes | |
| yap::collection::Map< yap::ID, Player * > | players_ |
| yap::PacketHandler | packetHandler_ |
Static Private Attributes | |
| static const yap::String | VELOCITY_CHANGED_SYNCHRONIZATION_HANDLER_NAME = "VelocitySync" |
| static const yap::String | STATE_CHANGED_SYNCHRONIZATION_HANDLER_NAME = "StateSync" |
| yse::Map::Map | ( | const yap::ID & | id | ) |
| void yse::Map::AddObject | ( | yap::DynamicWorldObject * | object | ) |
| void yse::Map::AddObject | ( | yap::StaticWorldObject * | object | ) |
| void yse::Map::AddPlayer | ( | Player * | player | ) |
|
virtual |
Implements yap::IPacketHandler.
Definition at line 85 of file Map.cpp.
|
private |
|
protectedvirtual |
|
private |
|
private |
|
virtual |
Implements yap::IPacketHandler.
Definition at line 69 of file Map.cpp.
|
protectedvirtual |
| void yse::Map::RemoveObject | ( | yap::DynamicWorldObject * | object | ) |
| void yse::Map::RemoveObject | ( | const yap::ID & | objectWorldID | ) |
| void yse::Map::RemoveObject | ( | yap::StaticWorldObject * | object | ) |
| void yse::Map::RemovePlayer | ( | Player * | player | ) |
|
virtual |
Implements yap::IPacketHandler.
Definition at line 90 of file Map.cpp.
|
private |
| void yse::Map::SendLoadObjects | ( | yap::IPacket & | packet | ) |
|
private |
|
virtual |
Implements yap::IPacketHandler.
Definition at line 74 of file Map.cpp.
|
private |
|
private |
|
virtual |
Implements yap::IPacketHandler.
Definition at line 95 of file Map.cpp.
|
private |
|
private |
|
staticprivate |
|
staticprivate |