summary refs log tree commit diff stats
path: root/src/effect_system.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2021-02-21 17:56:17 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2021-02-21 17:56:17 -0500
commit5df0d0616ee3996add0b14e0fb0becd6257d04a2 (patch)
tree19bf067462ea04abf500e0427d3daeb3a39434ee /src/effect_system.cpp
parentecbe17b582803aaeaa9ccee88a3d093ff93a6cd3 (diff)
downloadtanetane-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/effect_system.cpp')
-rw-r--r--src/effect_system.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/effect_system.cpp b/src/effect_system.cpp index 74fc8f3..aeccebb 100644 --- a/src/effect_system.cpp +++ b/src/effect_system.cpp
@@ -1,6 +1,9 @@
1#include "effect_system.h" 1#include "effect_system.h"
2#include "game.h"
2 3
3void EffectSystem::tick(double dt) { 4void EffectSystem::tick(double dt) {
5 if (game_.isGameplayPaused()) return;
6
4 if (screenFade_ != screenFadeDest_) { 7 if (screenFade_ != screenFadeDest_) {
5 screenFadeThus_ += dt; 8 screenFadeThus_ += dt;
6 if (screenFadeThus_ >= screenFadeLength_) { 9 if (screenFadeThus_ >= screenFadeLength_) {