Interface IEntity
Represents an entity such as players, NPCs, cars, etc.
Inherited Members
Namespace: OpenMod.Extensions.Games.Abstractions.Entities
Assembly: OpenMod.Extensions.Games.Abstractions.dll
Syntax
public interface IEntity : IGameObject
Properties
| Improve this Doc View SourceAsset
Gets the asset of the entity.
Declaration
IEntityAsset Asset { get; }
Property Value
Type | Description |
---|---|
IEntityAsset |
EntityInstanceId
Gets the unique instance ID of the entity.
Declaration
string EntityInstanceId { get; }
Property Value
Type | Description |
---|---|
System.String |
State
Gets the state of the entity.
Declaration
IEntityState State { get; }
Property Value
Type | Description |
---|---|
IEntityState |
Methods
| Improve this Doc View SourceSetPositionAsync(Vector3)
Sets the position of an entity.
Declaration
Task<bool> SetPositionAsync(Vector3 position)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | The position to set to. |
Returns
Type | Description |
---|---|
Task<System.Boolean> | True if successful; otherwise, false. |
SetPositionAsync(Vector3, Quaternion)
Sets the position and rotation of an entity.
Declaration
Task<bool> SetPositionAsync(Vector3 position, Quaternion rotation)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | The position to set to. |
Quaternion | rotation | The rotation to set to. |
Returns
Type | Description |
---|---|
Task<System.Boolean> | True if successful; otherwise, false. |