FujiAPI / Fuji

Celeste 64 Mod Loader
30 stars 10 forks source link

Add support for custom player states #8

Closed JaThePlayer closed 7 months ago

JaThePlayer commented 7 months ago

Adds new CustomPlayerState, which can be implemented by mods. Mods can then call GameMod.AddPlayerState<T> in their OnModLoaded callback, to register the state.

Adds an internal OnUnloadedCleanup action, which is called after OnModUnloaded, used for automatic de-registration of custom states, actor factories, etc.

Adds a few methods to the Player class to allow for easy handling of custom states. Makes a few things in Player which are helpful for custom states public, but we should really make everything there public at some point.

jasminegamedev commented 7 months ago

looks good to me 👍