import class Entity extends IScriptable
{
	public import const function GetEntity() : EntityGameInterface;
	public import function QueueEvent( evt : Event );
	public import const function GetEntityID() : EntityID;
	public import function QueueEventForNodeID( nodeID : GlobalNodeRef, evt : Event ) : Bool;
	public import function QueueEventForEntityID( entityID : EntityID, evt : Event ) : Bool;
	public import const function CanServiceEvent( evtName : CName ) : Bool;
	public import const function IsReplicated() : Bool;
	public import const function GetControllingPeerID() : Uint32;
	public import const function MatchVisualTag( visualTag : CName ) : Bool;
	public import const function MatchVisualTags( visualTags : array< CName > ) : Bool;
	public import const function IsControlledByAnyPeer() : Bool;
	public import const function IsControlledByLocalPeer() : Bool;
	public import const function IsControlledByAnotherClient() : Bool;
	public import const virtual function IsAttached() : Bool;
	protected import const final function FindComponentByName( componentName : CName ) : IComponent;
	public import function PrefetchAppearanceChange( newAppearanceName : CName );
	public import function ScheduleAppearanceChange( newAppearanceName : CName );
	public import const function GetCurrentAppearanceName() : CName;

	public virtual function OnInspectorDebugDraw( out box : InfoBox ) {}
	public import const final function GetWorldPosition() : Vector4;
	public import const final function GetWorldOrientation() : Quaternion;
	public import const final function GetWorldYaw() : Float;
	public import const final function GetWorldForward() : Vector4;
	public import const final function GetWorldRight() : Vector4;
	public import const final function GetWorldUp() : Vector4;

	public const final function GetWorldTransform() : WorldTransform
	{
		var worldTransform : WorldTransform;
		var worldPosition : WorldPosition;
		WorldPosition.SetVector4( worldPosition, GetWorldPosition() );
		WorldTransform.SetWorldPosition( worldTransform, worldPosition );
		WorldTransform.SetOrientation( worldTransform, GetWorldOrientation() );
		return worldTransform;
	}

	protected event OnSetGlitchOnUIEvent( evt : SetGlitchOnUIEvent )
	{
		var glitchEvt : AdvertGlitchEvent;
		glitchEvt = new AdvertGlitchEvent;
		glitchEvt.SetShouldGlitch( evt.intensity );
		QueueEvent( glitchEvt );
	}

}

