From 7e3b59b09399bf8da243fb4122caa2c9c10d2624 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Fri, 5 Mar 2021 09:39:31 -0500 Subject: Implemented circle transition effect (for exit area) --- src/effect_system.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/effect_system.h') 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: void stopShakingCamera(); + // Hides or reveals the screen using a circle transition. + // - length is the time in milliseconds + // - amount is [0,1], where 0 is fully revealed and 1 is fully hidden + void circleTransition(int length, double amount); + /* Information */ bool isScreenFaded() const { return screenFade_ > 0.0; } @@ -52,6 +57,12 @@ public: bool isCameraShaking() const { return cameraShaking_; } + bool isCircleTransitionActive() const { return circleEffect_ > 0.0; } + + double getCircleTransitionProgress() const { return circleEffect_; } + + bool isCircleTransitionComplete() const { return circleEffect_ == circleEffectDest_; } + private: Game& game_; @@ -72,6 +83,12 @@ private: vec2i cameraShakeOffset_ { 0, 0 }; bool cameraShakeOn_ = false; Timer cameraShakeTimer_ { 0 }; + + double circleEffect_ = 0.0; + double circleEffectDest_ = 0.0; + double circleEffectStart_ = 0.0; + double circleEffectLength_ = 0.0; + double circleEffectThus_ = 0.0; }; #endif /* end of include guard: EFFECT_SYSTEM_H_0B497B39 */ -- cgit 1.4.1