summary refs log tree commit diff stats
path: root/src/entityfactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/entityfactory.cpp')
-rw-r--r--src/entityfactory.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/entityfactory.cpp b/src/entityfactory.cpp index bf137e2..47a1463 100644 --- a/src/entityfactory.cpp +++ b/src/entityfactory.cpp
@@ -15,7 +15,7 @@ struct EntityData {
15 15
16static std::map<std::string, EntityData> factories; 16static std::map<std::string, EntityData> factories;
17 17
18std::shared_ptr<Entity> EntityFactory::createNamedEntity(const std::string name, const Map& map) 18std::shared_ptr<Entity> EntityFactory::createNamedEntity(const std::string name)
19{ 19{
20 auto it = factories.find(name); 20 auto it = factories.find(name);
21 EntityData data = factories[name]; 21 EntityData data = factories[name];
@@ -81,10 +81,10 @@ std::shared_ptr<Entity> EntityFactory::createNamedEntity(const std::string name,
81 { 81 {
82 if (!strcmp(data.action, "save")) 82 if (!strcmp(data.action, "save"))
83 { 83 {
84 auto component = std::make_shared<SimpleColliderComponent>([&] (Game& game, Entity& collider) { 84 auto component = std::make_shared<SimpleColliderComponent>([&] (Game& game, Entity&) {
85 playSound("../res/Pickup_Coin23.wav", 0.25); 85 playSound("../res/Pickup_Coin23.wav", 0.25);
86 86
87 game.saveGame(map, collider.position); 87 game.saveGame();
88 }); 88 });
89 entity->addComponent(component); 89 entity->addComponent(component);
90 } 90 }