diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-21 17:56:17 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-21 17:56:17 -0500 |
commit | 5df0d0616ee3996add0b14e0fb0becd6257d04a2 (patch) | |
tree | 19bf067462ea04abf500e0427d3daeb3a39434ee /src/animation_system.cpp | |
parent | ecbe17b582803aaeaa9ccee88a3d093ff93a6cd3 (diff) | |
download | tanetane-5df0d0616ee3996add0b14e0fb0becd6257d04a2.tar.gz tanetane-5df0d0616ee3996add0b14e0fb0becd6257d04a2.tar.bz2 tanetane-5df0d0616ee3996add0b14e0fb0becd6257d04a2.zip |
Added a debug console
Open it by pressing backtick, close it by hitting escape. Pressing backtick does not open it in release builds. Current shortcomings: opening it for the first time also types a backtick for some reason, but not on subsequent times. Also, it doesn't create a coroutine, so any script function that yields is going to fail. This also added a "is gameplay paused" flag to Game, which will be useful for adding a pause menu.
Diffstat (limited to 'src/animation_system.cpp')
-rw-r--r-- | src/animation_system.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/animation_system.cpp b/src/animation_system.cpp index c43d0ca..d23eae2 100644 --- a/src/animation_system.cpp +++ b/src/animation_system.cpp | |||
@@ -91,6 +91,8 @@ void AnimationSystem::initSprite(int spriteId, std::string_view filename) { | |||
91 | } | 91 | } |
92 | 92 | ||
93 | void AnimationSystem::tick(double dt) { | 93 | void AnimationSystem::tick(double dt) { |
94 | if (game_.isGameplayPaused()) return; | ||
95 | |||
94 | animTimer_.accumulate(dt); | 96 | animTimer_.accumulate(dt); |
95 | while (animTimer_.step()) { | 97 | while (animTimer_.step()) { |
96 | for (Sprite& sprite : game_.getSprites() | game_.spriteView()) { | 98 | for (Sprite& sprite : game_.getSprites() | game_.spriteView()) { |