1 using FarseerPhysics.Dynamics;
7 public const Category CollisionNone = Category.None;
8 public const Category CollisionAll = Category.All;
9 public const Category CollisionWall = Category.Cat1;
10 public const Category CollisionCharacter = Category.Cat2;
11 public const Category CollisionPlatform = Category.Cat3;
12 public const Category CollisionStairs = Category.Cat4;
13 public const Category CollisionItem = Category.Cat5;
14 public const Category CollisionItemBlocking = Category.Cat6;
15 public const Category CollisionProjectile = Category.Cat7;
16 public const Category CollisionLevel = Category.Cat8;
17 public const Category CollisionRepairableWall = Category.Cat9;
19 public const Category DefaultItemCollidesWith = CollisionWall | CollisionLevel | CollisionPlatform | CollisionRepairableWall;
21 public static float DisplayToRealWorldRatio = 1.0f / 100.0f;
23 public const float DisplayToSimRation = 100.0f;
25 public const float NeutralDensity = 10.0f;
27 public static bool TryParseCollisionCategory(
string categoryName, out Category category)
29 category = Category.None;
30 if (
string.IsNullOrEmpty(categoryName))
34 switch (categoryName.ToLowerInvariant())
37 category = CollisionAll;
41 category = CollisionWall;
44 category = CollisionCharacter;
47 category = CollisionPlatform;
50 category = CollisionStairs;
53 category = CollisionItem;
56 category = CollisionItemBlocking;
59 category = CollisionProjectile;
62 category = CollisionLevel;
65 category = CollisionRepairableWall;