diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-12 00:45:43 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-12 00:45:43 -0500 |
commit | 0a3ec1862fd479295639a38ab4799e4d36e12c13 (patch) | |
tree | 8651ccafcae9d53fb63234e089158a7cb29c278c /src/game.cpp | |
parent | 5ecd0f428dd8292a17c5013c525a4f5d3967acb8 (diff) | |
download | tanetane-0a3ec1862fd479295639a38ab4799e4d36e12c13.tar.gz tanetane-0a3ec1862fd479295639a38ab4799e4d36e12c13.tar.bz2 tanetane-0a3ec1862fd479295639a38ab4799e4d36e12c13.zip |
Added tile-sized invisible sprites
These are used when you want a solid, interactable object that is part of the map instead of sprite animated (e.g. the mailboxes).
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp index 8b6ef8f..fcd5f44 100644 --- a/src/game.cpp +++ b/src/game.cpp | |||
@@ -59,7 +59,9 @@ void Game::loadMap(std::string filename, std::string warpPoint, Direction dir) { | |||
59 | int spriteId = emplaceSprite(p.name); | 59 | int spriteId = emplaceSprite(p.name); |
60 | getSystem<TransformSystem>().initSprite(spriteId, p.pos); | 60 | getSystem<TransformSystem>().initSprite(spriteId, p.pos); |
61 | getSystem<TransformSystem>().setUpCollision(spriteId, p.collisionOffset, p.collisionSize, true); | 61 | getSystem<TransformSystem>().setUpCollision(spriteId, p.collisionOffset, p.collisionSize, true); |
62 | getSystem<AnimationSystem>().initSprite(spriteId, p.animationFilename); | 62 | if (!p.animationFilename.empty()) { |
63 | getSystem<AnimationSystem>().initSprite(spriteId, p.animationFilename); | ||
64 | } | ||
63 | getSprite(spriteId).interactionScript = p.interactionScript; | 65 | getSprite(spriteId).interactionScript = p.interactionScript; |
64 | } | 66 | } |
65 | 67 | ||