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>
|
IStrategy * | strategy = nullptr |
|
float | time = 0 |
|
this class inhertis from the IStrategy class and is represents a celebration decorator where the entity will celebrate according to it.
◆ ICelebrationDecorator()
ICelebrationDecorator::ICelebrationDecorator |
( |
IStrategy * |
strategy, |
|
|
double |
time = 4 |
|
) |
| |
Construct a new Celebration Decorator object.
- Parameters
-
[in] | strategy | the strategy to decorate onto |
[in] | time | how long to celebrate |
◆ celebrate()
virtual void ICelebrationDecorator::celebrate |
( |
IEntity * |
entity, |
|
|
double |
dt |
|
) |
| |
|
pure virtual |
◆ 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
-
entity | Entity to move |
dt | Delta 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: