Rename to GameDB and GameDB::Level.
This commit is contained in:
parent
c46927ea10
commit
a20d701096
23 changed files with 142 additions and 151 deletions
|
@ -21,7 +21,7 @@ namespace gui {
|
|||
}
|
||||
|
||||
void MainUI::init() {
|
||||
auto& player_position = Game::player_position();
|
||||
auto& player_position = GameDB::player_position();
|
||||
auto player = player_position.location;
|
||||
|
||||
$rayview->init_shaders();
|
||||
|
@ -32,7 +32,7 @@ namespace gui {
|
|||
}
|
||||
|
||||
DinkyECS::Entity MainUI::camera_aim() {
|
||||
auto& level = Game::current();
|
||||
auto& level = GameDB::current();
|
||||
// what happens if there's two things at that spot
|
||||
if(level.collision->something_there($rayview->aiming_at)) {
|
||||
return level.collision->get($rayview->aiming_at);
|
||||
|
@ -90,7 +90,7 @@ namespace gui {
|
|||
}
|
||||
|
||||
void MainUI::dead_entity(DinkyECS::Entity entity) {
|
||||
auto world = Game::current_world();
|
||||
auto world = GameDB::current_world();
|
||||
if(world->has<components::Sprite>(entity)) {
|
||||
auto &sprite = world->get<components::Sprite>(entity);
|
||||
$rayview->update_sprite(entity, sprite);
|
||||
|
@ -98,8 +98,8 @@ namespace gui {
|
|||
}
|
||||
|
||||
void MainUI::update_level() {
|
||||
auto& level = Game::current();
|
||||
auto& player_position = Game::player_position();
|
||||
auto& level = GameDB::current();
|
||||
auto& player_position = GameDB::player_position();
|
||||
auto player = player_position.location;
|
||||
|
||||
$rayview->update_level(level);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue