Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
PhysicsComponent.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using System.Collections.Generic;
4 
5 using SiliconStudio.Core;
6 using SiliconStudio.Core.Serialization.Converters;
7 using SiliconStudio.Paradox.EntityModel;
8 
9 namespace SiliconStudio.Paradox.Physics
10 {
11  [DataConverter(AutoGenerate = true)]
12  [DataContract("PhysicsComponent")]
13  public sealed class PhysicsComponent : EntityComponent
14  {
16 
18  {
19  Elements = new List<PhysicsElement>();
20  }
21 
22  /// <summary>
23  /// Elements describing the physical colliders/rigidbodies/character of this entity
24  /// Any runtime dynamic change should happen while the entity is not added to the Game object
25  /// </summary>
26  [DataMemberConvert]
27  public List<PhysicsElement> Elements { get; private set; }
28 
29  [DataMemberIgnore]
30  public PhysicsElement this[int i]
31  {
32  get { return Elements[i]; }
33  }
34 
35  public override PropertyKey DefaultKey
36  {
37  get { return Key; }
38  }
39  }
40 }
Base class for converters to/from a data type.
using SiliconStudio.Paradox. Physics
A class that represents a tag propety.
Definition: PropertyKey.cs:17