-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add ItemRenderer and script for items
- Loading branch information
Showing
10 changed files
with
100 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#include "ItemRenderer.h" | ||
|
||
#include "Akagoria.h" | ||
|
||
namespace akgr { | ||
|
||
ItemRenderer::ItemRenderer(Akagoria* game, const WorldResources& resources) | ||
: m_game(game) | ||
{ | ||
|
||
} | ||
|
||
void ItemRenderer::update(gf::Time time, int32_t floor) | ||
{ | ||
for (auto& item : m_game->world_state()->items) { | ||
if (item.spot.floor != floor) { | ||
continue; | ||
} | ||
|
||
|
||
|
||
} | ||
} | ||
|
||
void ItemRenderer::render_floor(gf::RenderRecorder& recorder, int32_t floor) | ||
{ | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#ifndef AKGR_ITEM_RENDERER_H | ||
#define AKGR_ITEM_RENDERER_H | ||
|
||
#include "FloorRenderer.h" | ||
|
||
namespace akgr { | ||
|
||
class Akagoria; | ||
struct WorldResources; | ||
|
||
class ItemRenderer : public FloorRenderer { | ||
public: | ||
ItemRenderer(Akagoria* game, const WorldResources& resources); | ||
|
||
void update(gf::Time time, int32_t floor) override; | ||
void render_floor(gf::RenderRecorder& recorder, int32_t floor) override; | ||
|
||
private: | ||
Akagoria* m_game = nullptr; | ||
}; | ||
|
||
|
||
} | ||
|
||
#endif // AKGR_ITEM_RENDERER_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters