Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
ColliderShapeAsset.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 
4 using SiliconStudio.Assets;
5 using SiliconStudio.Assets.Compiler;
6 using SiliconStudio.Core;
8 
9 namespace SiliconStudio.Paradox.Assets.Physics
10 {
11  [DataContract("ColliderShapeAsset")]
12  [AssetFileExtension(FileExtension)]
13  [AssetCompiler(typeof(ColliderShapeAssetCompiler))]
14  [AssetFactory(typeof(ColliderShapeFactory))]
15  [AssetDescription("Collider Shape", "A physics collider shape", false)]
16  public class ColliderShapeAsset : Asset
17  {
18  public const string FileExtension = ".pdxphy";
19 
21  {
22  Data = new PhysicsColliderShapeData();
23 
24  BuildOrder = 600; //make sure we build after Models
25  }
26 
27  /// <userdoc>
28  /// The collection of shapes in this asset, a collection shapes will automatically generate a compound shape.
29  /// </userdoc>
30  [DataMember(10)]
31  public PhysicsColliderShapeData Data { get; set; }
32 
33  private class ColliderShapeFactory : IAssetFactory
34  {
35  public Asset New()
36  {
37  return new ColliderShapeAsset();
38  }
39  }
40  }
41 }
Base class for Asset.
Definition: Asset.cs:14
Interface to create default instance of an asset type.
Definition: IAssetFactory.cs:8
using SiliconStudio.Paradox. Physics
Contains user-friendly names and descriptions of an asset type.