aboutsummaryrefslogtreecommitdiffstats
path: root/src/entity.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/entity.c')
-rw-r--r--src/entity.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/entity.c b/src/entity.c
index 919da95..70a7db5 100644
--- a/src/entity.c
+++ b/src/entity.c
@@ -16,6 +16,7 @@ Entity createEntity(EntityId id, Vector3 position)
{
Entity entity;
entity.id = id;
+ entity.state = ENTITY_DEFAULT_STATE;
// Bounding boxes.
switch (id)
@@ -213,3 +214,32 @@ void placeEntityOnGround(Entity* entity, const World* world)
setEntityPosition(entity, position);
}
+
+
+InteractionCommand interactWithOldMint(Entity* entity, Game* game,
+ Selection selection)
+{
+ if (selection == SELECTION_INTERACT)
+ {
+ // Run display message code.
+ return INTERACTION_TALK;
+ }
+ else
+ {
+ return INTERACTION_END;
+ }
+}
+
+InteractionCommand interactWithEntity(Entity* entity, Game* game,
+ Selection selection)
+{
+ switch (entity->id)
+ {
+ case OLD_MINT: // For testing.
+ return interactWithOldMint(entity, game, selection);
+ default:
+ break;
+ }
+
+ return INTERACTION_END;
+}