This commit is contained in:
YourWishes committed 2023-06-23 16:33:53 -07:00
1 parent b1f16c80cf
commit a17cc8e30c
11 files changed
+50 -91

No files matched your search

+7 -11
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();
}
};
}