/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-17 19:21:01 UTC
  • Revision ID: josh@9ix.org-20110917192101-8i3cly7ecyt9o46s
"light" in the dark

Show diffs side-by-side

added added

removed removed

Lines of Context:
206
206
    Level::LoadProject("project.xml");
207
207
    Level::Load("level.xml", this);
208
208
 
209
 
    std::list<Entity*> *walls = GetAllTag("wall");
210
 
    for (std::list<Entity*>::iterator i = walls->begin(); i != walls->end(); ++i)
 
209
    std::list<Entity*> *inv = GetAllTag("invisible");
 
210
    for (std::list<Entity*>::iterator i = inv->begin(); i != inv->end(); ++i)
211
211
      {
212
212
        Entity *e = (*i);
213
213
        Vector2 s = e->scale;
214
214
        e->SetCollider(new RectangleCollider(s.x * 64, s.y * 64));
215
215
      }
216
216
   
217
 
    player = new Player();
 
217
    Player *player = new Player;
218
218
    player->position = Graphics::GetScreenCenter();
219
219
    Add(player);
220
220
    Add(player->dark);
257
257
          {
258
258
            isPaused = !isPaused;
259
259
            
260
 
            if (isPaused) {
261
 
              player->dark->isVisible = false;
 
260
            if (isPaused)
262
261
              levelEditor->Enable();
263
 
            } else {
 
262
            else
264
263
              levelEditor->Disable();
265
 
              player->dark->isVisible = true;
266
 
            }
267
264
          }
268
265
      }
269
266
 
276
273
      this->font = Assets::RequestFont("LiberationSans-Regular.ttf", 18.0f);
277
274
    else
278
275
      this->font = font;
279
 
 
280
 
    SetLayer(-2);
281
276
  }
282
277
 
283
278
  void Text::Render()