YAPOG  0.0.1
Yet Another Pokemon Online Game
ycl::DestructibleObject Class Reference

#include <DestructibleObject.hpp>

Inheritance diagram for ycl::DestructibleObject:
Collaboration diagram for ycl::DestructibleObject:

List of all members.

Public Member Functions

 DestructibleObject (const yap::ID &id)
virtual ~DestructibleObject ()
void SetSprite (yap::ISprite *sprite)
ICloneable members.
virtual DestructibleObjectClone () const
IDrawable members.
virtual void Draw (yap::IDrawingContext &context)
virtual bool IsVisible () const
virtual void Show (bool isVisible)
virtual void ChangeColor (const sf::Color &color)
IDrawableWorldObject members.
virtual float GetComparisonPoint () const
 Specifies the point from which to make comparison.
virtual int GetLayerDepth () const
 Specifies the layer depth whose this IDrawableWorldObject belongs to. The layer depth is a prioritary factor for drawing order.
virtual void ChangeWorldDrawingPolicy (const yap::IWorldDrawingPolicy &worldDrawingPolicy)
 Changes the way that instance of IDrawableWorldObject is represented on the screen from its world position.
IDrawableDynamicWorldObject members.
virtual yap::Event
< IDrawableDynamicWorldObject
&, const yap::Vector2 & > & 
OnOrderStateChangedEvent ()
- Public Member Functions inherited from yap::DestructibleObject
virtual void Accept (IDynamicWorldObjectVisitor &visitor)
virtual void Accept (IDynamicWorldObjectConstVisitor &visitor) const
void SetDestructionBox (BoundingBox *destructionBox)
- Public Member Functions inherited from yap::DynamicWorldObject
virtual ~DynamicWorldObject ()
const IDGetWorldID () const
void SetWorldID (const ID &id)
const IDGetTypeID () const
 Returns the ID of this type from the ObjectFactory.
const Vector2GetMaxVelocity () const
void SetMaxVelocity (const Vector2 &maxVelocity)
void SetPhysicsCore (PhysicsCore *physicsCore)
void ApplyForce (const Vector2 &force)
const Vector2GetMove () const
void RawSetVelocity (const Vector2 &velocity)
const StringGetState () const
const StringGetLogicalState () const
bool TryChangeState (const String &state)
void SetInactive ()
void RawSetState (const String &state)
 Directly changes this DynamicWorldObject state. Used for synchronizing the attribut.
bool IsActive () const
bool IsMoving () const
void AddTriggerBoundingBox (BoundingBox *boundingBox)
void AddEvent (MapEvent *event)
void RemoveEvent (MapEvent *event)
void GetEventsCollidingWith (const CollidableArea &collidableArea, MapEventQueue &events) const
virtual void Update (const Time &dt)
 Makes the object evolve for one frame of the game.
- Public Member Functions inherited from yap::WorldObject
virtual ~WorldObject ()
const IDGetID () const
void SetID (const ID &id)
void SetCollidableArea (CollidableArea *collidableArea)
void AddPhysicsBoundingBox (BoundingBox *boundingBox)
void RemovePhysicsBoundingBox (BoundingBox *boundingBox)
bool CollidesWith (const CollidableArea &collidableArea, const Vector2 &offset) const
void AdjustCollidablePosition (ICollidable &collidable) const
 Moves the ICollidable collidable to this WorldObject position. To call once when adding the ICollidable to this WorldObject.
virtual const Vector2GetPosition () const
 Gets the coordinates in pixels of the origin of this ISpatial from the global origin.
virtual const Vector2GetSize () const
 Gets the size in pixels of this ISpatial.
virtual const Vector2GetTopLeft () const
virtual const Vector2GetBottomRight () const
virtual const Vector2GetCenter () const
virtual const FloatRectGetRectangle () const
virtual void Move (const Vector2 &offset)
virtual void Scale (const Vector2 &factor)
virtual void SetPosition (const Vector2 &position)
virtual void SetSize (const Vector2 &size)
virtual const int & GetZ () const
 Gets the highness of this ISpatial3.
virtual void SetZ (int z)
 Sets the highness of this ISpatial3.
virtual const int & GetH () const
 Gets the height of this ISpatial3.
virtual void SetH (int h)
 Sets the height of this ISpatial3.
virtual bool CollidesWith (const ICollidable &other) const
virtual bool CollidesWith (const ICollidable &other, const Vector2 &offset) const
- Public Member Functions inherited from yap::ICollidable
virtual ~ICollidable ()
- Public Member Functions inherited from yap::ISpatial3
virtual ~ISpatial3 ()
- Public Member Functions inherited from yap::ISpatial
virtual ~ISpatial ()
- Public Member Functions inherited from yap::IIDLoadable
virtual ~IIDLoadable ()
- Public Member Functions inherited from yap::ICloneable
virtual ~ICloneable ()
- Public Member Functions inherited from yap::IUpdateable
virtual ~IUpdateable ()
- Public Member Functions inherited from yap::IDrawableDynamicWorldObject
virtual ~IDrawableDynamicWorldObject ()
- Public Member Functions inherited from yap::IDrawableWorldObject
virtual ~IDrawableWorldObject ()
- Public Member Functions inherited from yap::IDrawable
virtual ~IDrawable ()

Public Attributes

yap::Event
< IDrawableDynamicWorldObject
&, const yap::Vector2 & > 
OnOrderStateChanged

Protected Member Functions

 DestructibleObject (const DestructibleObject &copy)
virtual const yap::StringGetObjectFactoryTypeName () const
virtual void HandleUpdate (const yap::Time &dt)
virtual yap::Vector2 HandleGetSize () const
virtual void HandleMove (const yap::Vector2 &offset)
virtual void HandleDraw (yap::IDrawingContext &context)
virtual void HandleShow (bool isVisible)
virtual void HandleChangeColor (const sf::Color &color)
virtual float HandleGetComparisonPoint () const
virtual int HandleGetLayerDepth () const
virtual void HandleChangeWorldDrawingPolicy (const yap::IWorldDrawingPolicy &worldDrawingPolicy)
- Protected Member Functions inherited from yap::DestructibleObject
 DestructibleObject (const DestructibleObject &copy)
virtual void HandleSetWorldID (const ID &worldID)
- Protected Member Functions inherited from yap::DynamicWorldObject
 DynamicWorldObject (const ID &id)
 DynamicWorldObject (const DynamicWorldObject &copy)
virtual void HandleSetCollidableArea (CollidableArea *collidableArea)
virtual void HandleApplyForce (const Vector2 &force)
virtual void HandleSetState (const String &state)
virtual void HandleScale (const Vector2 &factor)
virtual void HandleSetZ (int z)
virtual void HandleSetH (int h)
virtual void HandleOnVelocityChanged (const Vector2 &oldVelocity, const Vector2 &currentVelocity)
- Protected Member Functions inherited from yap::WorldObject
 WorldObject (const ID &id)
 WorldObject (const WorldObject &copy)
const
PhysicsBoundingBoxCollection
GetPhysicsBoundingBoxes () const

Private Member Functions

 DISALLOW_ASSIGN (DestructibleObject)

Private Attributes

bool isVisible_
sf::Color color_
const yap::IWorldDrawingPolicyworldDrawingPolicy_
yap::ISpritesprite_

Static Private Attributes

static const bool DEFAULT_VISIBLE_STATE = true
static const sf::Color DEFAULT_COLOR = sf::Color ()
static const int DEFAULT_LAYER_DEPTH = 1
static const yap::String OBJECT_FACTORY_TYPE_NAME = "DestructibleObject"

Detailed Description

Definition at line 15 of file DestructibleObject.hpp.


Constructor & Destructor Documentation

ycl::DestructibleObject::DestructibleObject ( const yap::ID id)
explicit

Reimplemented from yap::DestructibleObject.

Definition at line 15 of file DestructibleObject.cpp.

Here is the caller graph for this function:

ycl::DestructibleObject::~DestructibleObject ( )
virtual

Reimplemented from yap::DestructibleObject.

Definition at line 24 of file DestructibleObject.cpp.

ycl::DestructibleObject::DestructibleObject ( const DestructibleObject copy)
protected

Definition at line 28 of file DestructibleObject.cpp.

Here is the call graph for this function:


Member Function Documentation

void ycl::DestructibleObject::ChangeColor ( const sf::Color &  color)
virtual

Implements yap::IDrawable.

Definition at line 69 of file DestructibleObject.cpp.

Here is the call graph for this function:

void ycl::DestructibleObject::ChangeWorldDrawingPolicy ( const yap::IWorldDrawingPolicy worldDrawingPolicy)
virtual

Changes the way that instance of IDrawableWorldObject is represented on the screen from its world position.

Parameters:
NewIWorldDrawingPolicy to be applied.

Implements yap::IDrawableWorldObject.

Definition at line 86 of file DestructibleObject.cpp.

Here is the call graph for this function:

DestructibleObject * ycl::DestructibleObject::Clone ( ) const
virtual

Reimplemented from yap::DestructibleObject.

Definition at line 39 of file DestructibleObject.cpp.

Here is the call graph for this function:

ycl::DestructibleObject::DISALLOW_ASSIGN ( DestructibleObject  )
private
void ycl::DestructibleObject::Draw ( yap::IDrawingContext context)
virtual

Implements yap::IDrawable.

Definition at line 49 of file DestructibleObject.cpp.

Here is the call graph for this function:

float ycl::DestructibleObject::GetComparisonPoint ( ) const
virtual

Specifies the point from which to make comparison.

Returns:
The point from which to make comparison.

Implements yap::IDrawableWorldObject.

Definition at line 76 of file DestructibleObject.cpp.

Here is the call graph for this function:

int ycl::DestructibleObject::GetLayerDepth ( ) const
virtual

Specifies the layer depth whose this IDrawableWorldObject belongs to. The layer depth is a prioritary factor for drawing order.

Returns:
Layer depth

Implements yap::IDrawableWorldObject.

Definition at line 81 of file DestructibleObject.cpp.

Here is the call graph for this function:

const yap::String & ycl::DestructibleObject::GetObjectFactoryTypeName ( ) const
protectedvirtual

Reimplemented from yap::DestructibleObject.

Definition at line 101 of file DestructibleObject.cpp.

void ycl::DestructibleObject::HandleChangeColor ( const sf::Color &  color)
protectedvirtual

Definition at line 140 of file DestructibleObject.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::DestructibleObject::HandleChangeWorldDrawingPolicy ( const yap::IWorldDrawingPolicy worldDrawingPolicy)
protectedvirtual

Definition at line 156 of file DestructibleObject.cpp.

Here is the caller graph for this function:

void ycl::DestructibleObject::HandleDraw ( yap::IDrawingContext context)
protectedvirtual

Definition at line 130 of file DestructibleObject.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

float ycl::DestructibleObject::HandleGetComparisonPoint ( ) const
protectedvirtual

Definition at line 146 of file DestructibleObject.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int ycl::DestructibleObject::HandleGetLayerDepth ( ) const
protectedvirtual

Definition at line 151 of file DestructibleObject.cpp.

Here is the caller graph for this function:

yap::Vector2 ycl::DestructibleObject::HandleGetSize ( ) const
protectedvirtual

Reimplemented from yap::WorldObject.

Definition at line 114 of file DestructibleObject.cpp.

Here is the call graph for this function:

void ycl::DestructibleObject::HandleMove ( const yap::Vector2 offset)
protectedvirtual

Reimplemented from yap::DynamicWorldObject.

Definition at line 122 of file DestructibleObject.cpp.

Here is the call graph for this function:

void ycl::DestructibleObject::HandleShow ( bool  isVisible)
protectedvirtual

Definition at line 136 of file DestructibleObject.cpp.

Here is the caller graph for this function:

void ycl::DestructibleObject::HandleUpdate ( const yap::Time dt)
protectedvirtual

Reimplemented from yap::DynamicWorldObject.

Definition at line 106 of file DestructibleObject.cpp.

Here is the call graph for this function:

bool ycl::DestructibleObject::IsVisible ( ) const
virtual

Implements yap::IDrawable.

Definition at line 57 of file DestructibleObject.cpp.

Here is the caller graph for this function:

yap::Event< yap::IDrawableDynamicWorldObject &, const yap::Vector2 & > & ycl::DestructibleObject::OnOrderStateChangedEvent ( )
virtual

Implements yap::IDrawableDynamicWorldObject.

Definition at line 96 of file DestructibleObject.cpp.

void ycl::DestructibleObject::SetSprite ( yap::ISprite sprite)

Definition at line 44 of file DestructibleObject.cpp.

Here is the caller graph for this function:

void ycl::DestructibleObject::Show ( bool  isVisible)
virtual

Implements yap::IDrawable.

Definition at line 62 of file DestructibleObject.cpp.

Here is the call graph for this function:


Member Data Documentation

sf::Color ycl::DestructibleObject::color_
private

Definition at line 97 of file DestructibleObject.hpp.

const sf::Color ycl::DestructibleObject::DEFAULT_COLOR = sf::Color ()
staticprivate

Definition at line 90 of file DestructibleObject.hpp.

const int ycl::DestructibleObject::DEFAULT_LAYER_DEPTH = 1
staticprivate

Definition at line 92 of file DestructibleObject.hpp.

const bool ycl::DestructibleObject::DEFAULT_VISIBLE_STATE = true
staticprivate

Definition at line 89 of file DestructibleObject.hpp.

bool ycl::DestructibleObject::isVisible_
private

Definition at line 96 of file DestructibleObject.hpp.

const yap::String ycl::DestructibleObject::OBJECT_FACTORY_TYPE_NAME = "DestructibleObject"
staticprivate

Reimplemented from yap::DestructibleObject.

Definition at line 94 of file DestructibleObject.hpp.

yap::Event< IDrawableDynamicWorldObject&, const yap::Vector2&> ycl::DestructibleObject::OnOrderStateChanged

Definition at line 61 of file DestructibleObject.hpp.

yap::ISprite* ycl::DestructibleObject::sprite_
private

Definition at line 101 of file DestructibleObject.hpp.

const yap::IWorldDrawingPolicy* ycl::DestructibleObject::worldDrawingPolicy_
private

Definition at line 99 of file DestructibleObject.hpp.


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