Empeld
Empeld plugin documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
essentials.action.ItemFramework.Interactive.ItemUseContext Class Reference

A context to define in what scenario an item should be used in More...

Public Member Functions

 ItemUseContext (Vector3d position, Vector3d direction, uint entityId)
 

Static Public Member Functions

static ItemUseContext FromEntity (IPlayableEntity entity)
 Gets a context from a standard playable entity More...
 

Public Attributes

readonly Vector3d Position
 Position of the use More...
 
readonly Vector3d Direction
 Direction of the use More...
 
readonly uint EntityId
 Entity id that is using More...
 

Detailed Description

A context to define in what scenario an item should be used in

Constructor & Destructor Documentation

essentials.action.ItemFramework.Interactive.ItemUseContext.ItemUseContext ( Vector3d  position,
Vector3d  direction,
uint  entityId 
)
29  {
30  this.Position = position;
31  this.Direction = direction;
32  this.EntityId = entityId;
33  }
readonly Vector3d Direction
Direction of the use
Definition: ItemUseContext.cs:21
readonly uint EntityId
Entity id that is using
Definition: ItemUseContext.cs:26
readonly Vector3d Position
Position of the use
Definition: ItemUseContext.cs:16

Member Function Documentation

static ItemUseContext essentials.action.ItemFramework.Interactive.ItemUseContext.FromEntity ( IPlayableEntity  entity)
static

Gets a context from a standard playable entity

Returns
The entity.
Parameters
entityEntity.
41  {
42  return new ItemUseContext(entity.Position + entity.CameraOffset, entity.Rotation.Vector, entity.ObjectId);
43  }
Vector3d CameraOffset
Gets the camera offset compared to the Position of the entity
Definition: IPlayableEntity.cs:20
Rotation2d Rotation
Gets the rotation.
Definition: IPositionableEntity.cs:29
ItemUseContext(Vector3d position, Vector3d direction, uint entityId)
Definition: ItemUseContext.cs:28
Vector3d Vector
Definition: Rotation2d.cs:64
uint ObjectId
Gets the object identifier.
Definition: IEntity.cs:16
Vector3d Position
Gets the position.
Definition: IPositionableEntity.cs:17

Member Data Documentation

readonly Vector3d essentials.action.ItemFramework.Interactive.ItemUseContext.Direction

Direction of the use

readonly uint essentials.action.ItemFramework.Interactive.ItemUseContext.EntityId

Entity id that is using

readonly Vector3d essentials.action.ItemFramework.Interactive.ItemUseContext.Position

Position of the use


The documentation for this class was generated from the following file: