Finally renamed animate2 to animation thus completing the refactor. There's still things to do to make the new animation actually work though.
This commit is contained in:
parent
83f62e3f45
commit
81a282d544
21 changed files with 83 additions and 339 deletions
|
|
@ -2,7 +2,7 @@
|
|||
#include "components.hpp"
|
||||
#include "easings.hpp"
|
||||
#include <fmt/xchar.h>
|
||||
#include "animate2.hpp"
|
||||
#include "animation.hpp"
|
||||
#include "constants.hpp"
|
||||
#include "game_level.hpp"
|
||||
#include "ai.hpp"
|
||||
|
|
@ -20,7 +20,7 @@ namespace gui {
|
|||
auto config = settings::get("config");
|
||||
|
||||
$hand = textures::get_sprite(config["player"]["hands"]);
|
||||
$hand_anim = animate2::load("assets/animate2.json", config["player"]["hands"]);
|
||||
$hand_anim = animation::load("assets/animation.json", config["player"]["hands"]);
|
||||
}
|
||||
|
||||
void MainUI::dirty() {
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@
|
|||
#include "raycaster.hpp"
|
||||
#include <optional>
|
||||
|
||||
namespace animate2 {
|
||||
class Animate2;
|
||||
namespace animation {
|
||||
class Animation;
|
||||
}
|
||||
|
||||
namespace gui {
|
||||
|
|
@ -23,7 +23,7 @@ namespace gui {
|
|||
OverlayUI $overlay_ui;
|
||||
std::shared_ptr<Raycaster> $rayview;
|
||||
textures::SpriteTexture $hand;
|
||||
animate2::Animate2 $hand_anim;
|
||||
animation::Animation $hand_anim;
|
||||
|
||||
MainUI(sf::RenderWindow& window);
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace gui {
|
|||
$ritual_ui = textures::get_sprite("ritual_crafting_area");
|
||||
$ritual_ui.sprite->setPosition($gui.get_position());
|
||||
$ritual_ui.sprite->setTextureRect($ritual_closed_rect);
|
||||
$ritual_anim = animate2::load("assets/animate2.json", "ritual_crafting_area");
|
||||
$ritual_anim = animation::load("assets/animation.json", "ritual_crafting_area");
|
||||
|
||||
auto open_close_toggle = $gui.entity("ritual_ui");
|
||||
$gui.set<Clickable>(open_close_toggle, {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include <guecs/ui.hpp>
|
||||
#include "rituals.hpp"
|
||||
#include "simplefsm.hpp"
|
||||
#include "animate2.hpp"
|
||||
#include "animation.hpp"
|
||||
|
||||
namespace gui {
|
||||
namespace ritual {
|
||||
|
|
@ -35,7 +35,7 @@ namespace gui {
|
|||
public:
|
||||
sf::IntRect $ritual_closed_rect{{0,0},{380,720}};
|
||||
sf::IntRect $ritual_open_rect{{380 * 2,0},{380,720}};
|
||||
animate2::Animate2 $ritual_anim;
|
||||
animation::Animation $ritual_anim;
|
||||
guecs::UI $gui;
|
||||
textures::SpriteTexture $ritual_ui;
|
||||
::ritual::Engine $ritual_engine;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue