/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 20:36:00 UTC
  • Revision ID: josh@9ix.org-20110917203600-4g34074fjamm0ov4
and the graphic

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*> *inv = GetAllTag("invisible");
210
 
    for (std::list<Entity*>::iterator i = inv->begin(); i != inv->end(); ++i)
 
209
    std::list<Entity*> *walls = GetAllTag("wall");
 
210
    for (std::list<Entity*>::iterator i = walls->begin(); i != walls->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 *player = new Player;
 
217
    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)
 
260
            if (isPaused) {
 
261
              player->dark->isVisible = false;
261
262
              levelEditor->Enable();
262
 
            else
 
263
            } else {
263
264
              levelEditor->Disable();
 
265
              player->dark->isVisible = true;
 
266
            }
264
267
          }
265
268
      }
266
269
 
273
276
      this->font = Assets::RequestFont("LiberationSans-Regular.ttf", 18.0f);
274
277
    else
275
278
      this->font = font;
 
279
 
 
280
    SetLayer(-2);
276
281
  }
277
282
 
278
283
  void Text::Render()