From 60f685b7b544b94ae1e6212b939cdae5ac12e725 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Mon, 28 Sep 2015 08:14:20 -0400 Subject: added dropping from platforms --- src/ui.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ui.cpp') diff --git a/src/ui.cpp b/src/ui.cpp index 1e78dca..75bc5ee 100644 --- a/src/ui.cpp +++ b/src/ui.cpp @@ -142,6 +142,10 @@ namespace ui { player->vel.x=.15; currentWorld=currentWorld->goWorldRight(player); } + if(SDL_KEY==SDLK_s && player->ground==2){ + player->ground=false; + player->loc.y-=HLINE*1.5; + } if(SDL_KEY==SDLK_SPACE){ // Jump if(player->ground){ player->vel.y=.25; -- cgit v1.2.3