summary refs log tree commit diff stats
path: root/src/effect_system.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/effect_system.h')
-rw-r--r--src/effect_system.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/effect_system.h b/src/effect_system.h index 12ec7ca..904e6cb 100644 --- a/src/effect_system.h +++ b/src/effect_system.h
@@ -34,6 +34,11 @@ public:
34 34
35 void stopShakingCamera(); 35 void stopShakingCamera();
36 36
37 // Hides or reveals the screen using a circle transition.
38 // - length is the time in milliseconds
39 // - amount is [0,1], where 0 is fully revealed and 1 is fully hidden
40 void circleTransition(int length, double amount);
41
37 /* Information */ 42 /* Information */
38 43
39 bool isScreenFaded() const { return screenFade_ > 0.0; } 44 bool isScreenFaded() const { return screenFade_ > 0.0; }
@@ -52,6 +57,12 @@ public:
52 57
53 bool isCameraShaking() const { return cameraShaking_; } 58 bool isCameraShaking() const { return cameraShaking_; }
54 59
60 bool isCircleTransitionActive() const { return circleEffect_ > 0.0; }
61
62 double getCircleTransitionProgress() const { return circleEffect_; }
63
64 bool isCircleTransitionComplete() const { return circleEffect_ == circleEffectDest_; }
65
55private: 66private:
56 67
57 Game& game_; 68 Game& game_;
@@ -72,6 +83,12 @@ private:
72 vec2i cameraShakeOffset_ { 0, 0 }; 83 vec2i cameraShakeOffset_ { 0, 0 };
73 bool cameraShakeOn_ = false; 84 bool cameraShakeOn_ = false;
74 Timer cameraShakeTimer_ { 0 }; 85 Timer cameraShakeTimer_ { 0 };
86
87 double circleEffect_ = 0.0;
88 double circleEffectDest_ = 0.0;
89 double circleEffectStart_ = 0.0;
90 double circleEffectLength_ = 0.0;
91 double circleEffectThus_ = 0.0;
75}; 92};
76 93
77#endif /* end of include guard: EFFECT_SYSTEM_H_0B497B39 */ 94#endif /* end of include guard: EFFECT_SYSTEM_H_0B497B39 */