First commit that disconnects this game from the game framework so it can be its own thing.
This commit is contained in:
parent
8073997eb3
commit
db60f75bd9
29 changed files with 37 additions and 36 deletions
|
|
@ -201,7 +201,7 @@ void WorldBuilder::configure_starting_items(DinkyECS::World &world) {
|
|||
auto& player = world.get_the<Player>();
|
||||
auto &inventory = world.get<inventory::Model>(player.entity);
|
||||
|
||||
auto healing = System::spawn_item(world, "POTION_HEALING_SMALL");
|
||||
auto healing = System::spawn_item(world, "REPAIR_KIT");
|
||||
inventory.add("pocket_l", healing);
|
||||
world.make_constant(healing);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace gui {
|
|||
"[spawn1|spawn2|spawn3]"
|
||||
"[spawn4|spawn5|spawn6]");
|
||||
|
||||
add_spawn_button("RAT_GIANT", "rat_with_sword", "spawn4");
|
||||
// add_spawn_button("RAT_GIANT", "rat_with_sword", "spawn4");
|
||||
|
||||
$gui.init();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ namespace gui {
|
|||
auto config = settings::get("config");
|
||||
$hand = textures::get_sprite(config["player"]["hands"]);
|
||||
$hand_anim = animation::load("assets/animation.json", config["player"]["hands"]);
|
||||
int width = $hand_anim.sheet.frame_width;
|
||||
int height = $hand_anim.sheet.frame_height;
|
||||
$hand.sprite->setPosition({float(RAY_VIEW_X + (RAY_VIEW_WIDTH - width) / 2), float(RAY_VIEW_HEIGHT - height)});
|
||||
}
|
||||
|
||||
void MainUI::dirty() {
|
||||
|
|
@ -147,7 +150,6 @@ namespace gui {
|
|||
if($hand_anim.playing) {
|
||||
$hand_anim.update();
|
||||
$hand_anim.apply(*$hand.sprite);
|
||||
$hand.sprite->setPosition({RAY_VIEW_X, RAY_VIEW_Y});
|
||||
$window.draw(*$hand.sprite);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue