@@ -187,6 +187,21 @@ internal static void Exit(_Level level, LevelExit exit, LevelExit.Mode mode, _Se
187187 public static event CompleteHandler OnComplete ;
188188 internal static void Complete ( _Level level )
189189 => OnComplete ? . Invoke ( level ) ;
190+
191+ /// <summary>
192+ /// Called at the very beginning of <see cref="global::Celeste.Level.Update"/>.
193+ /// </summary>
194+ public static event Action < _Level > OnBeforeUpdate ;
195+ internal static void BeforeUpdate ( _Level level )
196+ => OnBeforeUpdate ? . Invoke ( level ) ;
197+
198+ /// <summary>
199+ /// Called at the very end of <see cref="global::Celeste.Level.Update"/>.
200+ /// </summary>
201+ public static event Action < _Level > OnAfterUpdate ;
202+
203+ internal static void AfterUpdate ( _Level level )
204+ => OnAfterUpdate ? . Invoke ( level ) ;
190205 }
191206
192207 public static class Session {
@@ -196,17 +211,41 @@ internal static void SliderChanged(patch_Session session, patch_Session.Slider s
196211 }
197212
198213 public static class Player {
214+ /// <summary>
215+ /// Called at the end of <see cref="global::Celeste.Player.Added"/>.
216+ /// </summary>
199217 public static event Action < _Player > OnSpawn ;
200218 internal static void Spawn ( _Player player )
201219 => OnSpawn ? . Invoke ( player ) ;
202220
221+ /// <summary>
222+ /// Called in <see cref="global::Celeste.Player.Die"/>, only if a PlayerDeadBody will be returned from the method.
223+ /// </summary>
203224 public static event Action < _Player > OnDie ;
204225 internal static void Die ( _Player player )
205226 => OnDie ? . Invoke ( player ) ;
206227
228+ /// <summary>
229+ /// Called in the Player constructor during <see cref="StateMachine"/> initialisation, to be used to register custom Player states.
230+ /// </summary>
207231 public static event Action < _Player > OnRegisterStates ;
208232 internal static void RegisterStates ( _Player player )
209233 => OnRegisterStates ? . Invoke ( player ) ;
234+
235+ /// <summary>
236+ /// Called at the very beginning of <see cref="global::Celeste.Player.Update"/>.
237+ /// </summary>
238+ public static event Action < _Player > OnBeforeUpdate ;
239+ internal static void BeforeUpdate ( _Player player )
240+ => OnBeforeUpdate ? . Invoke ( player ) ;
241+
242+ /// <summary>
243+ /// Called at the very end of <see cref="global::Celeste.Player.Update"/>.
244+ /// </summary>
245+ public static event Action < _Player > OnAfterUpdate ;
246+
247+ internal static void AfterUpdate ( _Player player )
248+ => OnAfterUpdate ? . Invoke ( player ) ;
210249 }
211250
212251 public static class Seeker {
0 commit comments