This commit is contained in:
2023-06-23 16:33:53 -07:00
parent 160aa43973
commit 2c84dc1d58
8 changed files with 41 additions and 32 deletions

View File

@ -4,24 +4,20 @@
// https://opensource.org/licenses/MIT
#pragma once
#include "VNAnimateEvent.hpp"
#include "VNEvent.hpp"
namespace Dawn {
template<typename T>
class VNSetEvent : public VNAnimateEvent<T> {
template<class T>
class VNSetEvent : public VNEvent {
public:
StateProperty<T> *modifies = nullptr;
T *modifies = nullptr;
T value;
protected:
void onStart() override {
assertNotNull(this->modifies);
this->from = modifies->getValue();
VNAnimateEvent<T>::onStart();
}
void setValue(T value) override {
modifies->setValue(value);
*modifies = value;
this->next();
}
};
}