about summary refs log tree commit diff stats
path: root/data/maps/control_center/rooms/White Ending.txtpb
blob: 62d4a56783add77e1cfc759a0e730c5fda9560ea (plain) (blame)
1
2
3
4
5
name: "White Ending"
endings {
  name: "WHITE"
  path: "Components/Endings/white_ending"
}
fferburbia@gmail.com> 2015-03-10 00:41:59 -0400 C++11'd everything!' href='/therapy/commit/src/entity.cpp?h=proto-objs&id=7f0e8c7ef70c62814c274f110367db92f01cbb26'>7f0e8c7 ^
b538260 ^
7f0e8c7 ^
b538260 ^
7f0e8c7 ^
b538260 ^


7f0e8c7 ^
b538260 ^
7f0e8c7 ^
b538260 ^
7f0e8c7 ^








b538260 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46






                                                       
                                                 
 
                                   
   
                                         


   
                                        
 
                                   
   
                                     


   
                                                   
 
                                   
   
                                               


   
                                                
 
                                   
   








                                                                                                  

   
#include "entity.h"

void Entity::addComponent(std::shared_ptr<Component> c)
{
  components.push_back(c);
}

void Entity::send(Game& game, const Message& msg)
{
  for (auto component : components)
  {
    component->receive(game, *this, msg);
  }
}

void Entity::tick(Game& game, double dt)
{
  for (auto component : components)
  {
    component->tick(game, *this, dt);
  }
}

void Entity::input(Game& game, int key, int action)
{
  for (auto component : components)
  {
    component->input(game, *this, key, action);
  }
}

void Entity::render(Game& game, Texture& buffer)
{
  for (auto component : components)
  {
    component->render(game, *this, buffer);
  }
}

void Entity::detectCollision(Game& game, Entity& collider, std::pair<double, double> old_position)
{
  for (auto component : components)
  {
    component->detectCollision(game, *this, collider, old_position);
  }
}