Skip to content

Commit

Permalink
[ChestOpeningState] Small fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Unarelith committed Jan 5, 2019
1 parent 87b70f8 commit 3372c40
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion source/game/factories/CollectableFactory.cpp
Expand Up @@ -30,7 +30,7 @@

gk::SceneObject CollectableFactory::create(u16 x, u16 y, const std::string &name, const std::string &soundEffectName, CollectableMovement::Type movementType) {
gk::SceneObject object(name, "Collectable");
object.set<gk::MovementComponent>(new CollectableMovement(movementType));
object.set<gk::MovementComponent>(new CollectableMovement(movementType)).speed = 0.4f;
object.set<CollectableComponent>("sfx-" + soundEffectName);
object.set<LifetimeComponent>(6000);

Expand Down
2 changes: 1 addition & 1 deletion source/main.cpp
Expand Up @@ -15,6 +15,6 @@

int main(int argc, char **argv) {
Application app{argc, argv};
return app.run(false);
return app.run();
}

4 changes: 2 additions & 2 deletions source/states/ChestOpeningState.cpp
Expand Up @@ -14,12 +14,12 @@
#include <gk/audio/AudioPlayer.hpp>
#include <gk/core/ApplicationStateStack.hpp>
#include <gk/scene/component/MovementComponent.hpp>
#include <gk/scene/controller/MovementController.hpp>

#include "CollectableFactory.hpp"
#include "ChestOpeningState.hpp"
#include "LifetimeComponent.hpp"
#include "MessageBoxState.hpp"
#include "MovementController.hpp"
#include "PositionComponent.hpp"
#include "Sprite.hpp"
#include "World.hpp"
Expand All @@ -39,7 +39,7 @@ ChestOpeningState::ChestOpeningState(gk::SceneObject &chest, gk::ApplicationStat

void ChestOpeningState::update() {
if(m_state == State::Opening) {
gk::MovementController movementController;
MovementController movementController;
movementController.update(*m_item);

auto &movementComponent = m_item->get<gk::MovementComponent>();
Expand Down

0 comments on commit 3372c40

Please sign in to comment.