Fixed a few small things.
This commit is contained in:
@ -10,18 +10,18 @@ namespace Dawn {
|
||||
template<typename T>
|
||||
class VNSetEvent : public VNAnimateEvent<T> {
|
||||
public:
|
||||
T *modifies = nullptr;
|
||||
StateProperty<T> *modifies = nullptr;
|
||||
|
||||
protected:
|
||||
void onStart() override {
|
||||
assertNotNull(this->modifies);
|
||||
this->from = *modifies;
|
||||
this->from = modifies->getValue();
|
||||
|
||||
VNAnimateEvent<T>::onStart();
|
||||
}
|
||||
|
||||
void setValue(T value) override {
|
||||
*modifies = value;
|
||||
modifies->setValue(value);
|
||||
}
|
||||
};
|
||||
}
|
@ -110,6 +110,26 @@ namespace Dawn {
|
||||
return this->_realValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides an alternate way to set the value, e.g. if using the equals
|
||||
* operator is not possible.
|
||||
*
|
||||
* @param val Value to set on this property.
|
||||
*/
|
||||
void setValue(V val) {
|
||||
this->setInternal(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides an alternate way to get the value, e.g. if using the equals
|
||||
* operator is not possible.
|
||||
*
|
||||
* @return The value of this property.
|
||||
*/
|
||||
V getValue() {
|
||||
return this->_realValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Destructor for StateProperty.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user