GitBrincie212 / Apel-Mod

Apel is a library that brings particle animations to the table with flexible behaviour and a clean developer interface. It promises also lots of predefined shapes & paths to help the developer on their particle scene
Other
2 stars 1 forks source link

Re-apply ParticleCombiner fixes #29

Closed DarthSharkie closed 4 months ago

DarthSharkie commented 4 months ago

Using Arrays.asList (and similar methods) often results in unmodifiable lists. This means future calls to setObject, setOffset, appendObject, and appendObjects will not work. Handle this by creating ArrayLists when needed.

Remove separate offset handling. There is no reason for ParticleCombiner to have separate offsets from the one already available on ParticleObject. This will result in double offsets when ParticleCombiner applies an offset in its draw method prior to calling the draw on the child ParticleObject. To maintain the convenience afforded by the combiner, the various "offset" methods delegate to those of the ParticleObject.

This also readds the test. Having the tests break last time showed that the merge was not done cleanly. The merge had conflicts, and I believe they were resolved by taking the main branch's contents instead of working through the differences. This broke the test, which had no conflicts, but showed the correct behavior of ParticleCombiner.