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
|
|
@ -7,17 +7,17 @@
|
|||
#include <chrono>
|
||||
#include <thread>
|
||||
#include "rand.hpp"
|
||||
#include "animate2.hpp"
|
||||
#include "animation.hpp"
|
||||
#include "sound.hpp"
|
||||
#include "components.hpp"
|
||||
|
||||
using namespace components;
|
||||
using namespace textures;
|
||||
using namespace std::chrono_literals;
|
||||
using namespace animate2;
|
||||
using namespace animation;
|
||||
|
||||
Animate2 load_animation(const string& name) {
|
||||
auto anim = animate2::load("assets/animate2.json", "rat_king_boss");
|
||||
Animation load_animation(const string& name) {
|
||||
auto anim = animation::load("assets/animation.json", "rat_king_boss");
|
||||
anim.set_form("attack");
|
||||
|
||||
anim.transform.looped = false;
|
||||
|
|
@ -33,7 +33,7 @@ void FAKE_RENDER() {
|
|||
std::this_thread::sleep_for(Random::milliseconds(5, 32));
|
||||
}
|
||||
|
||||
void PLAY_TEST(Animate2 &anim) {
|
||||
void PLAY_TEST(Animation &anim) {
|
||||
REQUIRE(anim.transform.looped == false);
|
||||
anim.play();
|
||||
|
||||
|
|
@ -158,7 +158,7 @@ TEST_CASE("confirm transition changes work", "[animation-new]") {
|
|||
}
|
||||
|
||||
TEST_CASE("playing with delta time", "[animation-new]") {
|
||||
animate2::Timer timer;
|
||||
animation::Timer timer;
|
||||
timer.start();
|
||||
|
||||
for(int i = 0; i < 20; i++) {
|
||||
Loading…
Add table
Add a link
Reference in a new issue