IWorldΒΆ

interface IWorld : System.IDisposable

The World interface.

A world is a container for the entities and logic of the current game state. It encapsulates the general appearance and logic of the game while the world is active (unlike T:Protogame.IWorldManager which applies throughout the execution of the entire game).

This is an interface which all of the worlds you define should implement.

void RenderAbove(IGameContext gameContext, IRenderContext renderContext)

This is called by T:Protogame.IWorldManager when rendering is about to finish. Rendering has not yet been completely finalized, but all entities have been rendered in the current context.

Parameters:
  • gameContext (Protogame.IGameContext) – The game context.
  • renderContext (Protogame.IRenderContext) – The render context.
void RenderBelow(IGameContext gameContext, IRenderContext renderContext)

This is called by T:Protogame.IWorldManager when rendering has started, but no entities have yet been rendering in the current context.

Parameters:
  • gameContext (Protogame.IGameContext) – The game context.
  • renderContext (Protogame.IRenderContext) – The render context.
void Update(IGameContext gameContext, IUpdateContext updateContext)

This is called by T:Protogame.IWorldManager after all of the entities have been updated.

Parameters:
  • gameContext (Protogame.IGameContext) – The game context.
  • updateContext (Protogame.IUpdateContext) – The update context.