C# Class MonoInjection.MonoInjector

Inheritance: MonoBehaviour
Mostrar archivo Open project: DameonL/MonoInjection

Public Methods

Method Description
Inject ( Action callback ) : void

Queues a callback to be called at the next Update.

Reset ( ) : void
Subscribe ( IUpdate subscriber ) : void

Adds an object to the list of subscribers called every update.

Unsubscribe ( IUpdate subscriber ) : void

Removes an object from the list of subscribers called every Update.

Private Methods

Method Description
FixedUpdate ( ) : void
LateUpdate ( ) : void
OnDestroy ( ) : void
ProcessCalls ( float deltaTime ) : void
Update ( ) : void

Method Details

Inject() public method

Queues a callback to be called at the next Update.
public Inject ( Action callback ) : void
callback Action Any delegate that accepts no parameters and returns void.
return void

Reset() public method

public Reset ( ) : void
return void

Subscribe() public method

Adds an object to the list of subscribers called every update.
public Subscribe ( IUpdate subscriber ) : void
subscriber IUpdate An object which is to be called every update.
return void

Unsubscribe() public method

Removes an object from the list of subscribers called every Update.
public Unsubscribe ( IUpdate subscriber ) : void
subscriber IUpdate The object to be removed from the list.
return void