diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2015-09-11 22:34:39 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2015-09-11 22:34:39 -0400 |
commit | a55903b8784df7c7033983212ca974e472c51dbf (patch) | |
tree | ac675f670c45e77b56a07e031945a045b042ef66 /src/UIClass.cpp | |
parent | 61bd2cfb0bd85c5d169ff994f1840996d39897ab (diff) |
basic layered worlds :)
Diffstat (limited to 'src/UIClass.cpp')
-rw-r--r-- | src/UIClass.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/UIClass.cpp b/src/UIClass.cpp index 56a9f47..731e387 100644 --- a/src/UIClass.cpp +++ b/src/UIClass.cpp @@ -1,6 +1,7 @@ #include <UIClass.h> extern Player player; +extern World *currentWorld; void UIClass::handleEvents(){ SDL_Event e; @@ -20,6 +21,12 @@ void UIClass::handleEvents(){ case SDLK_a: ///A player.velg.x = -10; break; + case SDLK_i: + if(currentWorld->behind)currentWorld=currentWorld->behind; + break; + case SDLK_k: + if(currentWorld->infront)currentWorld=currentWorld->infront; + break; default: break; } |