CSCI3081W Drone Delivery System
Public Member Functions | Protected Attributes | List of all members
ICelebrationDecorator Class Referenceabstract

this class inhertis from the IStrategy class and is represents a celebration decorator where the entity will celebrate according to it. More...

#include <ICelebrationDecorator.h>

Inheritance diagram for ICelebrationDecorator:
Inheritance graph
[legend]
Collaboration diagram for ICelebrationDecorator:
Collaboration graph
[legend]

Public Member Functions

 ICelebrationDecorator (IStrategy *strategy, double time=4)
 Construct a new Celebration Decorator object. More...
 
virtual ~ICelebrationDecorator ()
 Celebration Destructor.
 
virtual void move (IEntity *entity, double dt)
 Move the entity with the behavior as described for 4 seconds. More...
 
virtual bool isCompleted ()
 Check if the movement is completed by checking the time. More...
 
virtual void celebrate (IEntity *entity, double dt)=0
 Make the entity celebrate. More...
 
double currentPathDistance (Vector3 startPosition)
 Get the current distance of the entire path starting from startPosition and the current index. More...
 
double totalPathDistance (Vector3 startPosition)
 Get the total distance of the entire path starting from startPosition and index 0. More...
 
- Public Member Functions inherited from IStrategy
virtual ~IStrategy ()
 Destructor.
 

Protected Attributes

IStrategystrategy = nullptr
 
float time = 0
 

Detailed Description

this class inhertis from the IStrategy class and is represents a celebration decorator where the entity will celebrate according to it.

Constructor & Destructor Documentation

◆ ICelebrationDecorator()

ICelebrationDecorator::ICelebrationDecorator ( IStrategy strategy,
double  time = 4 
)

Construct a new Celebration Decorator object.

Parameters
[in]strategythe strategy to decorate onto
[in]timehow long to celebrate

Member Function Documentation

◆ celebrate()

virtual void ICelebrationDecorator::celebrate ( IEntity entity,
double  dt 
)
pure virtual

Make the entity celebrate.

Parameters
entityEntity to celebrate
dtDelta Time

Implemented in SpinDecorator, and JumpDecorator.

◆ currentPathDistance()

double ICelebrationDecorator::currentPathDistance ( Vector3  startPosition)
virtual

Get the current distance of the entire path starting from startPosition and the current index.

Returns
double of current distance to final destination of this path starting from startPosition and the current index

Reimplemented from IStrategy.

◆ isCompleted()

virtual bool ICelebrationDecorator::isCompleted ( )
virtual

Check if the movement is completed by checking the time.

Returns
True if complete, false if not complete

Implements IStrategy.

◆ move()

virtual void ICelebrationDecorator::move ( IEntity entity,
double  dt 
)
virtual

Move the entity with the behavior as described for 4 seconds.

Parameters
entityEntity to move
dtDelta Time

Implements IStrategy.

◆ totalPathDistance()

double ICelebrationDecorator::totalPathDistance ( Vector3  startPosition)
virtual

Get the total distance of the entire path starting from startPosition and index 0.

Returns
double of total distance to final destination of this path starting from startPosition

Reimplemented from IStrategy.


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