ObjectList

Description

sealed class Tinman.Engine.Components.ObjectList

A list of child components for providing automatic callbacks for common interfaces.

Callbacks for IInputConsumer are performed in the order in which the IInputConsumer objects have been added to this list, until an object returns true from IInputConsumer.ConsumeInput.

There are no automatic callbacks for IRenderable.Render and IRenderable2D.Render2D, since the issuing of render commands is usually tightly coupled with the render pipeline.

Public / Constructors

ObjectList


public constructor ObjectList → ()

Creates a new instance of ObjectList.

Public / Methods

ObjectAdd


public method ObjectAdd → (2)

obj in : object

[not-null]
The object to add.

callbacks opt : ObjectListFlags = ObjectListFlags.All

The callbacks to perform.

Adds an object to this list.

The following callbacks are performed immediately on obj in:

  1. IInputConsumerEx.InputAttach:
    If this object list is currently attached to an input state object.

  2. IGraphicsComponent.GraphicsAttach:
    IGraphicsComponent.GraphicsResize:
    If this object list is currently attached to a graphics object.

RenderException

If a graphics subsystem error has occurred while calling IGraphicsComponent.GraphicsAttach on the given object.

ObjectAddNoThrow


public method ObjectAddNoThrow → (2)

obj in : object

[not-null]
The object to add.

callbacks opt : ObjectListFlags = ObjectListFlags.All

The callbacks to perform.

Adds an object to this list, assuming that the given object does not implement IGraphicsComponent or that IGraphicsComponent.GraphicsAttach has not been called on this ObjectList object.

This method delegates to ObjectAdd and panics if a RenderException is thrown. Use this method to allow static code analysis to exploit the fact that RenderException will never be thrown.

ObjectRemove


public method ObjectRemove → (1)

obj in : object

[not-null]
The object to remove.

Removes an object from this list.

The following callbacks are performed immediately on obj in:

  1. IGraphicsComponent.GraphicsDetach:
    If this object list is currently attached to a graphics object.

  2. IInputConsumerEx.InputDetach:
    If this object list is currently attached to an input state object.