diff options
| author | nathan <nathansmith@disroot.org> | 2025-10-24 10:24:35 +0000 |
|---|---|---|
| committer | nathan <nathansmith@disroot.org> | 2025-10-24 10:24:35 +0000 |
| commit | 8874e4a585d66c16299ad45e79ea6c55960dee02 (patch) | |
| tree | 728de2a02a5b61e0ecb57d35f653c7f280a97e0d /src/entity.c | |
| parent | 5f402fc99a19d7d73ba75f632aed5cbef7e3920a (diff) | |
| download | FindThings-8874e4a585d66c16299ad45e79ea6c55960dee02.tar.gz FindThings-8874e4a585d66c16299ad45e79ea6c55960dee02.tar.bz2 FindThings-8874e4a585d66c16299ad45e79ea6c55960dee02.zip | |
Working on interaction system (finally)
Diffstat (limited to 'src/entity.c')
| -rw-r--r-- | src/entity.c | 30 |
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; +} |
