Moved more files around, working on VN engine

This commit is contained in:
2023-04-20 14:08:02 -07:00
parent 6d86fc10bc
commit cacda495d3
5 changed files with 103 additions and 11 deletions

View File

@ -0,0 +1,31 @@
// Copyright (c) 2023 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#pragma once
#include "SimpleAnimation.hpp"
namespace Dawn {
template<typename T>
struct SimplerCallbackAnimation : public SimpleAnimation<T> {
protected:
T value;
void onValueModified() override {
SimpleAnimation<T>::onValueModified();
this->callback(this->value);
}
public:
std::function<void(T)> callback = std::function<void(T)>();
/**
* Construct a new Simple Function Animation object
*/
SimplerCallbackAnimation() :
SimpleAnimation<T>(&value)
{
}
};
}