PlanetStep.h 517 B

123456789101112131415161718192021222324252627
  1. //
  2. // Created by jovian on 18/08/17.
  3. //
  4. #ifndef SPACEEXPANSION_PLANETSTEP_H
  5. #define SPACEEXPANSION_PLANETSTEP_H
  6. #include "../Contents/PlanetDef.h"
  7. class PlanetStep {
  8. // Methods
  9. public :
  10. PlanetStep(int delay);
  11. void callApply(PlanetDef &def); // Call apply if time is elapsed
  12. private:
  13. virtual void apply(PlanetDef &def) = 0; // Apply rule
  14. // Attributes
  15. protected:
  16. const int m_delay; // Number of frames between each application
  17. int m_elapsed;
  18. };
  19. #endif //SPACEEXPANSION_PLANETSTEP_H