Interface IComponent
A component can be added to an entity (object/character/button/etc), and add additional behavior to it.
Inherited Members
System.IDisposable.Dispose()
System.ComponentModel.INotifyPropertyChanged.PropertyChanged
Namespace: AGS.API
Assembly: AGS.API.dll
Syntax
public interface IComponent : IDisposable, INotifyPropertyChanged
Properties
| Improve this Doc View SourceEntity
The entity which holds this component.
Declaration
IEntity Entity { get; }
Property Value
Type | Description |
---|---|
IEntity |
Name
The name of the component.
Declaration
string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
RegistrationType
The type under which the component was registered with the entity.
Declaration
Type RegistrationType { get; }
Property Value
Type | Description |
---|---|
System.Type |
Methods
| Improve this Doc View SourceAfterInit()
This called after all the components have been initialized. If the component requires data from another component AFTER it has been initialized, this is the place to do it.
Declaration
void AfterInit()
Init(IEntity, Type)
Initializes the component. If the component is dependant on other components, they should be retrieved here using entity.GetComponent.
Declaration
void Init(IEntity entity, Type registrationType)
Parameters
Type | Name | Description |
---|---|---|
IEntity | entity | The entity which holds this component. |
System.Type | registrationType | The type under which the component was registered with the entity. |