Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
SiliconStudio.Paradox.EntityModel.Entity Class Reference

Game entity. It usually aggregates multiple EntityComponent More...

Inheritance diagram for SiliconStudio.Paradox.EntityModel.Entity:
SiliconStudio.Core.ComponentBase SiliconStudio.Core.IContentUrl IEnumerable SiliconStudio.Core.IComponent SiliconStudio.Core.ICollectorHolder SiliconStudio.Core.IReferencable SiliconStudio.Core.IReferencable

Classes

class  EntityDebugView
 

Public Member Functions

 Entity ()
 Create a new Entity instance. More...
 
 Entity (string name)
 Create a new Entity instance having the provided name. More...
 
 Entity (Vector3 position, string name=null)
 Create a new Entity instance having the provided name and initial position. More...
 
GetOrCreate< T > ()
 Gets or create a component with the specified key. More...
 
GetOrCreate< T > (PropertyKey< T > key)
 Gets or create a component with the specified key. More...
 
void Add (EntityComponent component)
 Adds the specified component using the EntityComponent.DefaultKey. More...
 
Get< T > ()
 Gets a component by the specified key. More...
 
Get< T > (PropertyKey< T > key)
 Gets a component by the specified key. More...
 
void Add< T > (PropertyKey< T > key, T value)
 Sets a component with the specified key. More...
 
void Set< T > (PropertyKey< T > key, T value)
 Sets a component with the specified key. More...
 
override string ToString ()
 
- Public Member Functions inherited from SiliconStudio.Core.ComponentBase
void Dispose ()
 
override string ToString ()
 

Protected Attributes

TransformationComponent transformation
 

Properties

TransformationComponent Transformation [get, set]
 Gets or sets the Transformation associated to this entity. Added for convenience over usual Get/Set method. More...
 
- Properties inherited from SiliconStudio.Core.ComponentBase
long Id [get, set]
 
string Name [get, set]
 Gets or sets the name of this component. More...
 
bool IsDisposed [get, set]
 Has the component been disposed or not yet. More...
 
- Properties inherited from SiliconStudio.Core.IComponent
long Id [get]
 Gets the id of this component. More...
 
string Name [get]
 Gets the name of this component. More...
 
- Properties inherited from SiliconStudio.Core.IReferencable
int ReferenceCount [get]
 Gets the reference count of this instance. More...
 
- Properties inherited from SiliconStudio.Core.ICollectorHolder
ObjectCollector Collector [get]
 Gets the collector. More...
 
- Properties inherited from SiliconStudio.Core.IContentUrl
string Url [get, set]
 The URL of this asset. More...
 

Additional Inherited Members

- Public Attributes inherited from SiliconStudio.Core.ComponentBase
PropertyContainer Tags
 Gets the attached properties to this component. More...
 
- Protected Member Functions inherited from SiliconStudio.Core.ComponentBase
 ComponentBase ()
 Initializes a new instance of the ComponentBase class. More...
 
 ComponentBase (string name)
 Initializes a new instance of the ComponentBase class. More...
 
virtual void OnNameChanged ()
 Called when Name property was changed. More...
 
virtual void Destroy ()
 Disposes of object resources. More...
 

Detailed Description

Game entity. It usually aggregates multiple EntityComponent

Definition at line 28 of file Entity.cs.

Constructor & Destructor Documentation

SiliconStudio.Paradox.EntityModel.Entity.Entity ( )

Create a new Entity instance.

Definition at line 41 of file Entity.cs.

SiliconStudio.Paradox.EntityModel.Entity.Entity ( string  name)

Create a new Entity instance having the provided name.

Parameters
nameThe name to give to the entity

Definition at line 50 of file Entity.cs.

SiliconStudio.Paradox.EntityModel.Entity.Entity ( Vector3  position,
string  name = null 
)

Create a new Entity instance having the provided name and initial position.

Parameters
positionThe initial position of the entity
nameThe name to give to the entity

Definition at line 60 of file Entity.cs.

Member Function Documentation

void SiliconStudio.Paradox.EntityModel.Entity.Add ( EntityComponent  component)

Adds the specified component using the EntityComponent.DefaultKey.

Parameters
componentThe component.
Exceptions
System.ArgumentNullExceptioncomponent

Definition at line 125 of file Entity.cs.

Referenced by SiliconStudio.Paradox.Engine.AudioEmitterComponent.AttachSoundEffect().

void SiliconStudio.Paradox.EntityModel.Entity.Add< T > ( PropertyKey< T >  key,
value 
)

Sets a component with the specified key.

Template Parameters
TType of the component
Parameters
keyThe key.
valueThe value.
Exceptions
System.ArgumentNullExceptionkey
Type Constraints
T :EntityComponent 

Definition at line 162 of file Entity.cs.

T SiliconStudio.Paradox.EntityModel.Entity.Get< T > ( )

Gets a component by the specified key.

Template Parameters
TType of the component
Returns
The component or null if does no exist
Exceptions
System.ArgumentNullExceptionkey
Type Constraints
T :EntityComponent 
T :new() 

Definition at line 137 of file Entity.cs.

T SiliconStudio.Paradox.EntityModel.Entity.Get< T > ( PropertyKey< T >  key)

Gets a component by the specified key.

Template Parameters
TType of the component
Parameters
keyThe key.
Returns
The component or null if does no exist
Exceptions
System.ArgumentNullExceptionkey
Type Constraints
T :EntityComponent 

Definition at line 149 of file Entity.cs.

T SiliconStudio.Paradox.EntityModel.Entity.GetOrCreate< T > ( )

Gets or create a component with the specified key.

Template Parameters
TType of the entity component
Returns
A new or existing instance of {T}
Type Constraints
T :EntityComponent 
T :new() 

Definition at line 89 of file Entity.cs.

T SiliconStudio.Paradox.EntityModel.Entity.GetOrCreate< T > ( PropertyKey< T >  key)

Gets or create a component with the specified key.

Template Parameters
TType of the entity component
Parameters
keyThe key.
Returns
A new or existing instance of {T}
Type Constraints
T :EntityComponent 
T :new() 

Definition at line 108 of file Entity.cs.

void SiliconStudio.Paradox.EntityModel.Entity.Set< T > ( PropertyKey< T >  key,
value 
)

Sets a component with the specified key.

Template Parameters
TType of the component
Parameters
keyThe key.
valueThe value.
Exceptions
System.ArgumentNullExceptionkey
Type Constraints
T :EntityComponent 

Definition at line 176 of file Entity.cs.

override string SiliconStudio.Paradox.EntityModel.Entity.ToString ( )

Definition at line 232 of file Entity.cs.

Member Data Documentation

TransformationComponent SiliconStudio.Paradox.EntityModel.Entity.transformation
protected

Definition at line 30 of file Entity.cs.

Property Documentation

TransformationComponent SiliconStudio.Paradox.EntityModel.Entity.Transformation
getset

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