/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:
19
19
    footsteps->SetLoops(0); //loop indefinitely
20
20
    
21
21
    SetCollider(new RectangleCollider(16, 16));
 
22
 
 
23
    dark = new Entity();
 
24
    dark->SetGraphic(new Sprite("dark.png", FILTER_NONE, 2048, 1536)); //alpha?
22
25
  }
23
26
 
24
27
  void Player::Update()
74
77
    else
75
78
      footsteps->Pause(); //Stop()?
76
79
 
 
80
    dark->position = position;
 
81
 
77
82
    //Scene::GetCamera()->position = position;
78
83
  }
79
84
 
212
217
    Player *player = new Player;
213
218
    player->position = Graphics::GetScreenCenter();
214
219
    Add(player);
 
220
    Add(player->dark);
215
221
 
216
222
    Creature *creature = new Creature;
217
223
    creature->position = Graphics::GetScreenCenter();
221
227
    creature2->position = Graphics::GetScreenCenter();
222
228
    Add(creature2);
223
229
 
224
 
    Graphics::SetBackgroundColor(Color::black * 0.2f);
 
230
    Graphics::SetBackgroundColor(Color::green * 0.2f);
225
231
 
226
232
  }
227
233