CSCI3081W Drone Delivery System
ICelebrationDecorator.h
1 #ifndef CELEBRATION_DECORATOR_H_
2 #define CELEBRATION_DECORATOR_H_
3 
4 #include "IStrategy.h"
5 
12  protected:
13  IStrategy* strategy = nullptr;
14  float time = 0;
15 
16  public:
23  ICelebrationDecorator(IStrategy* strategy, double time = 4);
24 
29 
36  virtual void move(IEntity* entity, double dt);
37 
43  virtual bool isCompleted();
44 
51  virtual void celebrate(IEntity* entity, double dt) = 0;
52 
53  double currentPathDistance(Vector3 startPosition);
54 
55  double totalPathDistance(Vector3 startPosition);
56 };
57 
58 #endif // CELEBRATION_DECORATOR_H_
this class inhertis from the IStrategy class and is represents a celebration decorator where the enti...
Definition: ICelebrationDecorator.h:11
virtual void celebrate(IEntity *entity, double dt)=0
Make the entity celebrate.
virtual ~ICelebrationDecorator()
Celebration Destructor.
double currentPathDistance(Vector3 startPosition)
Get the current distance of the entire path starting from startPosition and the current index.
double totalPathDistance(Vector3 startPosition)
Get the total distance of the entire path starting from startPosition and index 0.
virtual void move(IEntity *entity, double dt)
Move the entity with the behavior as described for 4 seconds.
ICelebrationDecorator(IStrategy *strategy, double time=4)
Construct a new Celebration Decorator object.
virtual bool isCompleted()
Check if the movement is completed by checking the time.
Represents an entity in a physical system.
Definition: IEntity.h:22
Strategy interface.
Definition: IStrategy.h:11
a simple class used for vector math, most function are self explanatory
Definition: vector3.h:12