The current implementation of property setters is a bit verbose.
It could probably be reduced to a single method setProperty() that would take the property name from the command address and check the type needed with typeof(object.get(property)). I've started implementing something similar in /relative (see https://github.com/loopier/animatron/commit/434598dba303ad847b4ac5b5611736d7fbb52c74), where it also checks if it's an Actor or an Animation property without having to specify it.
Ideally, we would end up with a dictionary of commands to set properties similar to this:
The current implementation of property setters is a bit verbose. It could probably be reduced to a single method
setProperty()
that would take the property name from the command address and check the type needed withtypeof(object.get(property))
. I've started implementing something similar in/relative
(see https://github.com/loopier/animatron/commit/434598dba303ad847b4ac5b5611736d7fbb52c74), where it also checks if it's anActor
or anAnimation
property without having to specify it.Ideally, we would end up with a dictionary of commands to set properties similar to this: