Guest User

Untitled

a guest
Jan 3rd, 2012
14
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.16 KB | None | 0 0
  1. namespace TinkerWorX.Legeria
  2. {
  3.     /// <summary>
  4.     /// This is base tiles, they are where the magic is, they have various effects, and supply a lot of base material for construction.
  5.     /// </summary>
  6.     public sealed partial class TileBaseType
  7.     {
  8.         public static TileBaseType[] Types;
  9.  
  10.         public TileBaseType(Byte id, String name, String assetName)
  11.         {
  12.             this.Id = id;
  13.             this.Name = name;
  14.             this.AssetName = assetName;
  15.  
  16.             if (TileBaseType.Types == null)
  17.                 TileBaseType.Types = new TileBaseType[Byte.MaxValue + 1];
  18.             TileBaseType.Types[id] = this;
  19.         }
  20.  
  21.         public Byte Id;
  22.  
  23.         public String Name;
  24.  
  25.         public String AssetName;
  26.  
  27.         public Texture2D Texture = null;
  28.  
  29.         public Boolean IsRendered = true;
  30.  
  31.         public TileUpdate Update = null;
  32.  
  33.         public Boolean BlocksAmbientLight = true;
  34.  
  35.         public Boolean EmitsLight = false;
  36.  
  37.         public Boolean IsSolid = true;
  38.  
  39.         public Int32 Health = 10;
  40.  
  41.         public Int32 Hardness = 2;
  42.  
  43.         public Single Friction = 16.00f;
  44.  
  45.         public Single Elasticity = 0.00f;
  46.  
  47.         public Single Reflection = 0.00f;
  48.     }
  49.  
  50.     public sealed partial class TileBaseType
  51.     {
  52.         /// <summary>
  53.         /// Void type is used for invalid tiles.
  54.         /// </summary>
  55.         public static readonly TileBaseType Void = new TileBaseType(0, String.Empty, String.Empty)
  56.         {
  57.             IsRendered = false,
  58.             Hardness = Int32.MaxValue
  59.         };
  60.     }
  61.  
  62.     public sealed partial class TileBaseType
  63.     {
  64.         /// <summary>
  65.         /// This is free air.
  66.         /// </summary>
  67.         public static readonly TileBaseType None = new TileBaseType(1, "Air", String.Empty)
  68.         {
  69.             IsRendered = false,
  70.             BlocksAmbientLight = false,
  71.             IsSolid = false
  72.         };
  73.     }
  74.  
  75.     public sealed partial class TileBaseType
  76.     {
  77.         /// <summary>
  78.         /// This is basic dirt.
  79.         /// </summary>
  80.         public static readonly TileBaseType Dirt = new TileBaseType(2, "Dirt", @"Tiles\Base\Dirt");
  81.     }
  82. }
Advertisement
Add Comment
Please, Sign In to add comment