summary refs log tree commit diff stats
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index c041cf8..c77d25b 100644 --- a/src/main.cpp +++ b/src/main.cpp
@@ -26,9 +26,20 @@ int main(int, char**)
26 Entity& crate = sim.getEntity(crateId); 26 Entity& crate = sim.getEntity(crateId);
27 crate.size = TILE_SIZE; 27 crate.size = TILE_SIZE;
28 crate.speed = 4.0; 28 crate.speed = 4.0;
29 crate.playerCanPush = true; 29 crate.colliderType = ColliderType::crate;
30 crate.canBePushedBy.insert(ColliderType::player);
31 crate.canBePushedBy.insert(ColliderType::crate);
30 sim.setGridPos(crateId, vec2s { 4, 5 } ); 32 sim.setGridPos(crateId, vec2s { 4, 5 } );
31 33
34 Simulation::id_type crateId2 = sim.emplaceEntity();
35 Entity& crate2 = sim.getEntity(crateId2);
36 crate2.size = TILE_SIZE;
37 crate2.speed = 4.0;
38 crate2.colliderType = ColliderType::crate;
39 crate2.canBePushedBy.insert(ColliderType::player);
40 crate2.canBePushedBy.insert(ColliderType::crate);
41 sim.setGridPos(crateId2, vec2s { 6, 7 } );
42
32 bool quit = false; 43 bool quit = false;
33 44
34 SDL_Event e; 45 SDL_Event e;