/minild29

To get this branch, use:
bzr branch http://9ix.org/bzr/minild29

« back to all changes in this revision

Viewing changes to Dark.cpp

  • Committer: Josh C
  • Date: 2011-09-19 18:02:20 UTC
  • Revision ID: josh@9ix.org-20110919180220-flnvccj5mdk3441x
chompy noise, make collisions with hunters work a little better

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
    bool xcol = false;
59
59
    bool ycol = false;
60
60
 
61
 
    if (Collide("exit")) {
62
 
      Scene *s = GetScene();
63
 
      s->isPaused = true;
64
 
      
65
 
      Text *win1 = new Text("You made it safely through the dark!", 
66
 
                           Assets::RequestFont("LiberationSans-Regular.ttf", 50.0f));
67
 
      win1->position = Vector2(-350,0);
68
 
      s->Add(win1);
69
 
 
70
 
      Text *win2 = new Text("Congratulations!", 
71
 
                           Assets::RequestFont("LiberationSans-Regular.ttf", 50.0f));
72
 
      win2->position = Vector2(-150,50);
73
 
      s->Add(win2);
74
 
    }
75
 
 
76
61
    Collider *collider = NULL;
77
62
 
78
63
    position.x += velocity.x * Monocle::deltaTime;
399
384
 
400
385
    Graphics::Set2D(1024, 768);
401
386
 
402
 
    Text *inst1 = new Text("Use arrow keys to move");
403
 
    inst1->position = Vector2(-492, -354);
404
 
    Add(inst1);
405
 
 
406
387
    Text *inst2 = new Text("Press ESC to quit");
407
 
    inst2->position = Vector2(-492, -334); // 20px h, 30px v from U-L corner
 
388
    inst2->position = Vector2(-492, -354); // 20px h, 30px v from U-L corner
408
389
    Add(inst2);
409
390
 
410
391
    Input::DefineMaskKey("left", KEY_LEFT);
443
424
        Vector2 s = e->scale;
444
425
        e->SetCollider(new RectangleCollider(s.x * 64, s.y * 64));
445
426
      }
446
 
 
447
 
    Entity* exit = GetFirstEntityWithTag("exit");
448
 
    Vector2 s = exit->scale;
449
 
    exit->SetCollider(new RectangleCollider(s.x * 64, s.y * 64));
450
 
 
451
427
   
452
428
    Graphics::SetBackgroundColor(Color::green * 0.2f);
453
429