stuck
This commit is contained in:
@ -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();
|
||||
}
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user