InteractiveComponent<T>
Namespace: Bang.Interactions
Assembly: Bang.dll
public sealed struct InteractiveComponent<T> : IInteractiveComponent, IComponent, IModifiableComponent
Implements an interaction component which will be passed on to the entity.
Implements: IInteractiveComponent, IComponent, IModifiableComponent
⭐ Constructors
public InteractiveComponent<T>()
Default constructor, initializes a brand new interaction.
public InteractiveComponent<T>(T interaction)
Parameters
interaction
T
⭐ Methods
Interact(World, Entity, Entity)
public virtual void Interact(World world, Entity interactor, Entity interacted)
Calls the inner interaction component.
Parameters
world
World
interactor
Entity
interacted
Entity
Subscribe(Action)
public virtual void Subscribe(Action notification)
Subscribe for notifications on this component.
Parameters
notification
Action
Unsubscribe(Action)
public virtual void Unsubscribe(Action notification)
Stop listening to notifications on this component.
Parameters
notification
Action
⚡