CircuitLord / NotReaper

A mapper for the VR rhythm game Audica
GNU General Public License v3.0
22 stars 14 forks source link

Refactor to use TargetData everywhere #60

Closed Mettra closed 5 years ago

Mettra commented 5 years ago

This PR refactors how Target and TargetIcon is used in the editor.

At a high level, it flips the dependency of how the rest of the editor gets/sets data with respect to targets and icons. Everyone now references the TargetData on Target and TargetIcon to view and set all properties like position, beat timing, behavior etc. Target and TargetIcon point at the same TargetData, and register callback handlers to update their internal state to reflect whatever the current data on TargetData is. This should make it so that whenever we update this data anywhere else in the editor, the note automatically syncs up without having to manually set data in gridTargetIcon or timelineTargetIcon. Because of this, gridTargetIcon and timelineTargetIcon are no longer accessible publicly from Target