aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2016-10-26 07:43:32 -0400
committerClyne Sullivan <tullivan99@gmail.com>2016-10-26 07:43:32 -0400
commit52de6c2e6c048b84a7665b6fc583b2259bbdd3af (patch)
treefd42df62429b5e7e18d2a04a23e4bc5615f2097a /include
parent8eb1625aea5ccaa07414e699e784440a94277ab0 (diff)
player stuff
Diffstat (limited to 'include')
-rw-r--r--include/components.hpp6
-rw-r--r--include/entities.hpp6
-rw-r--r--include/player.hpp7
-rw-r--r--include/world.hpp1
4 files changed, 10 insertions, 10 deletions
diff --git a/include/components.hpp b/include/components.hpp
index 857236f..becc839 100644
--- a/include/components.hpp
+++ b/include/components.hpp
@@ -75,6 +75,12 @@ struct Health {
int maxHealth;
};
+struct Portal {
+ Portal(std::string tf = "") : toFile(tf) {}
+
+ std::string toFile;
+};
+
/**
* @struct Solid
* @brief Allows an entity to collide with other objects.
diff --git a/include/entities.hpp b/include/entities.hpp
deleted file mode 100644
index f7c3894..0000000
--- a/include/entities.hpp
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef ENTITIES_HPP_
-#define ENTITIES_HPP_
-
-void entityxTest();
-
-#endif // ENTITIES_HPP_
diff --git a/include/player.hpp b/include/player.hpp
index 6bad917..e196fa4 100644
--- a/include/player.hpp
+++ b/include/player.hpp
@@ -10,7 +10,7 @@ constexpr const float PLAYER_SPEED_CONSTANT = 0.15f;
class PlayerSystem : public entityx::System<PlayerSystem>, public entityx::Receiver<PlayerSystem> {
private:
- entityx::Entity::Id pid;
+ entityx::Entity player;
bool moveLeft;
bool moveRight;
@@ -21,6 +21,8 @@ public:
PlayerSystem(void)
: moveLeft(false), moveRight(false), speed(1.0f) {}
+ void create(void);
+
void configure(entityx::EventManager&);
void update(entityx::EntityManager &en, entityx::EventManager &ev, entityx::TimeDelta dt) override;
@@ -28,9 +30,6 @@ public:
void receive(const KeyUpEvent&);
void receive(const KeyDownEvent&);
- inline void setPlayer(const entityx::Entity& e)
- { pid = e.id(); }
-
vec2 getPosition(void) const;
};
diff --git a/include/world.hpp b/include/world.hpp
index 58dfc2c..fb0a5fa 100644
--- a/include/world.hpp
+++ b/include/world.hpp
@@ -167,6 +167,7 @@ public:
void goWorldLeft(Position& p);
void goWorldRight(Position& p);
+ void goWorldPortal(Position& p);
// worlddata2 stuff
WorldData2 worldData;