~gustav-hartvigsson/+junk/invaders_vala

« back to all changes in this revision

Viewing changes to src/Game.vala

  • Committer: Gusatv Hartvigsson
  • Date: 2011-12-29 22:10:26 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20111229221026-zk80pp02f47a94gj
* added Make file
* added so that one can quit with [escape] key.
*    BUG: Event handling still not working....

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
        fpsTimer = SDL.Timer.get_ticks();
35
35
        draw();
36
36
        process_events();
 
37
        
 
38
        if(eventBool[KeySymbol.ESCAPE]){
 
39
          stdout.printf("derp!\n");
 
40
          this.isRun = false;
 
41
        }
 
42
        
37
43
        if(SDL.Timer.get_ticks() - fpsTimer < 1000/SCREEN_FPS){
38
44
          SDL.Timer.delay(1000/SCREEN_FPS - (SDL.Timer.get_ticks() - fpsTimer));
39
45
        }