EverestAPI / SpringCollab2020

Code mod to be used for the 2020 Celeste Spring Community Collab.
MIT License
2 stars 0 forks source link

Move Block with customizable speed #91

Closed maddie480 closed 4 years ago

maddie480 commented 4 years ago

Closes #72.

The Ahorn part is just a copy-paste from the vanilla entity code, with the "fast" attribute replaced with a "moveSpeed" attribute for more customization. The default value is the "slow" vanilla speed.

In the C# part, I chose to "wrap" the Controller method, since the speed is set in the middle of this routine, and it is 200 lines long. The private targetSpeed attribute is set just after a yield return 0.2f;, so this is how the wrapper knows this value might have to be changed. This limits the number of operations done with reflection.