change player on tab

This commit is contained in:
josh committed 2013-02-17 23:19:30 -05:00
1 parent 8398a09cf1
commit 11d5513c9f
2 files changed
+5

No files matched your search

+2
View File
@@ -26,6 +26,7 @@ class Game
public:
void change_player()
{
m_pindex = (m_pindex + 1) % 2;
}
void handle_move_event(ref MoveEvent me)
{
@@ -34,4 +35,5 @@ public:
protected:
uint m_tick;
Player[2] m_players;
int m_pindex;
};
+3
View File
@@ -101,6 +101,9 @@ int main(char[][] args)
break;
case SDLK_s:
break;
case SDLK_TAB:
game.change_player();
break;
default:
break;
}