diff options
Diffstat (limited to 'timedLatch.cpp')
-rw-r--r-- | timedLatch.cpp | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/timedLatch.cpp b/timedLatch.cpp deleted file mode 100644 index 66714a5..0000000 --- a/timedLatch.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include "timedLatch.hpp" - -namespace ur { - -TimedLatch::TimedLatch(sf::Time duration) -{ - this->duration = duration; - this->clock = sf::Clock(); - this->isStarted = false; -}; - -void -TimedLatch::start() -{ - this->clock.restart(); - this->isStarted = true; -}; - -bool -TimedLatch::is_running() -{ - return this->isStarted && this->clock.getElapsedTime() < duration; -}; - -bool -TimedLatch::is_completed() -{ - - return this->isStarted && this->clock.getElapsedTime() >= duration; -}; - -void -TimedLatch::reset() -{ - this->isStarted = false; -}; - -} |