forked from mirror/DotRecast
for unity3d
This commit is contained in:
parent
4a3e52350d
commit
cb65fc619d
|
@ -24,8 +24,8 @@ namespace DotRecast.Recast
|
||||||
{
|
{
|
||||||
public const int RC_AREA_FLAGS_MASK = 0x3F;
|
public const int RC_AREA_FLAGS_MASK = 0x3F;
|
||||||
|
|
||||||
public int Value { get; }
|
public readonly int Value;
|
||||||
public int Mask { get; }
|
public readonly int Mask;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mask is set to all available bits, which means value is fully applied
|
* Mask is set to all available bits, which means value is fully applied
|
||||||
|
@ -35,7 +35,7 @@ namespace DotRecast.Recast
|
||||||
*/
|
*/
|
||||||
public RcAreaModification(int value)
|
public RcAreaModification(int value)
|
||||||
{
|
{
|
||||||
this.Value = value;
|
Value = value;
|
||||||
Mask = RC_AREA_FLAGS_MASK;
|
Mask = RC_AREA_FLAGS_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,8 +48,8 @@ namespace DotRecast.Recast
|
||||||
*/
|
*/
|
||||||
public RcAreaModification(int value, int mask)
|
public RcAreaModification(int value, int mask)
|
||||||
{
|
{
|
||||||
this.Value = value;
|
Value = value;
|
||||||
this.Mask = mask;
|
Mask = mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RcAreaModification(RcAreaModification other)
|
public RcAreaModification(RcAreaModification other)
|
||||||
|
|
|
@ -30,12 +30,12 @@ public class SampleAreaModifications
|
||||||
public const int SAMPLE_POLYAREA_TYPE_GRASS = 0x5;
|
public const int SAMPLE_POLYAREA_TYPE_GRASS = 0x5;
|
||||||
public const int SAMPLE_POLYAREA_TYPE_JUMP = 0x6;
|
public const int SAMPLE_POLYAREA_TYPE_JUMP = 0x6;
|
||||||
|
|
||||||
public static RcAreaModification SAMPLE_AREAMOD_GROUND = new RcAreaModification(SAMPLE_POLYAREA_TYPE_GROUND, SAMPLE_POLYAREA_TYPE_MASK);
|
public static readonly RcAreaModification SAMPLE_AREAMOD_GROUND = new RcAreaModification(SAMPLE_POLYAREA_TYPE_GROUND, SAMPLE_POLYAREA_TYPE_MASK);
|
||||||
public static RcAreaModification SAMPLE_AREAMOD_WATER = new RcAreaModification(SAMPLE_POLYAREA_TYPE_WATER, SAMPLE_POLYAREA_TYPE_MASK);
|
public static readonly RcAreaModification SAMPLE_AREAMOD_WATER = new RcAreaModification(SAMPLE_POLYAREA_TYPE_WATER, SAMPLE_POLYAREA_TYPE_MASK);
|
||||||
public static RcAreaModification SAMPLE_AREAMOD_ROAD = new RcAreaModification(SAMPLE_POLYAREA_TYPE_ROAD, SAMPLE_POLYAREA_TYPE_MASK);
|
public static readonly RcAreaModification SAMPLE_AREAMOD_ROAD = new RcAreaModification(SAMPLE_POLYAREA_TYPE_ROAD, SAMPLE_POLYAREA_TYPE_MASK);
|
||||||
public static RcAreaModification SAMPLE_AREAMOD_GRASS = new RcAreaModification(SAMPLE_POLYAREA_TYPE_GRASS, SAMPLE_POLYAREA_TYPE_MASK);
|
public static readonly RcAreaModification SAMPLE_AREAMOD_GRASS = new RcAreaModification(SAMPLE_POLYAREA_TYPE_GRASS, SAMPLE_POLYAREA_TYPE_MASK);
|
||||||
public static RcAreaModification SAMPLE_AREAMOD_DOOR = new RcAreaModification(SAMPLE_POLYAREA_TYPE_DOOR, SAMPLE_POLYAREA_TYPE_DOOR);
|
public static readonly RcAreaModification SAMPLE_AREAMOD_DOOR = new RcAreaModification(SAMPLE_POLYAREA_TYPE_DOOR, SAMPLE_POLYAREA_TYPE_DOOR);
|
||||||
public static RcAreaModification SAMPLE_AREAMOD_JUMP = new RcAreaModification(SAMPLE_POLYAREA_TYPE_JUMP, SAMPLE_POLYAREA_TYPE_JUMP);
|
public static readonly RcAreaModification SAMPLE_AREAMOD_JUMP = new RcAreaModification(SAMPLE_POLYAREA_TYPE_JUMP, SAMPLE_POLYAREA_TYPE_JUMP);
|
||||||
|
|
||||||
public const int SAMPLE_POLYFLAGS_WALK = 0x01; // Ability to walk (ground, grass, road)
|
public const int SAMPLE_POLYFLAGS_WALK = 0x01; // Ability to walk (ground, grass, road)
|
||||||
public const int SAMPLE_POLYFLAGS_SWIM = 0x02; // Ability to swim (water).
|
public const int SAMPLE_POLYFLAGS_SWIM = 0x02; // Ability to swim (water).
|
||||||
|
|
|
@ -30,23 +30,12 @@ public class SampleAreaModifications
|
||||||
public const int SAMPLE_POLYAREA_TYPE_GRASS = 0x5;
|
public const int SAMPLE_POLYAREA_TYPE_GRASS = 0x5;
|
||||||
public const int SAMPLE_POLYAREA_TYPE_JUMP = 0x6;
|
public const int SAMPLE_POLYAREA_TYPE_JUMP = 0x6;
|
||||||
|
|
||||||
public static RcAreaModification SAMPLE_AREAMOD_GROUND = new RcAreaModification(SAMPLE_POLYAREA_TYPE_GROUND,
|
public static readonly RcAreaModification SAMPLE_AREAMOD_GROUND = new RcAreaModification(SAMPLE_POLYAREA_TYPE_GROUND, SAMPLE_POLYAREA_TYPE_MASK);
|
||||||
SAMPLE_POLYAREA_TYPE_MASK);
|
public static readonly RcAreaModification SAMPLE_AREAMOD_WATER = new RcAreaModification(SAMPLE_POLYAREA_TYPE_WATER, SAMPLE_POLYAREA_TYPE_MASK);
|
||||||
|
public static readonly RcAreaModification SAMPLE_AREAMOD_ROAD = new RcAreaModification(SAMPLE_POLYAREA_TYPE_ROAD, SAMPLE_POLYAREA_TYPE_MASK);
|
||||||
public static RcAreaModification SAMPLE_AREAMOD_WATER = new RcAreaModification(SAMPLE_POLYAREA_TYPE_WATER,
|
public static readonly RcAreaModification SAMPLE_AREAMOD_GRASS = new RcAreaModification(SAMPLE_POLYAREA_TYPE_GRASS, SAMPLE_POLYAREA_TYPE_MASK);
|
||||||
SAMPLE_POLYAREA_TYPE_MASK);
|
public static readonly RcAreaModification SAMPLE_AREAMOD_DOOR = new RcAreaModification(SAMPLE_POLYAREA_TYPE_DOOR, SAMPLE_POLYAREA_TYPE_DOOR);
|
||||||
|
public static readonly RcAreaModification SAMPLE_AREAMOD_JUMP = new RcAreaModification(SAMPLE_POLYAREA_TYPE_JUMP, SAMPLE_POLYAREA_TYPE_JUMP);
|
||||||
public static RcAreaModification SAMPLE_AREAMOD_ROAD = new RcAreaModification(SAMPLE_POLYAREA_TYPE_ROAD,
|
|
||||||
SAMPLE_POLYAREA_TYPE_MASK);
|
|
||||||
|
|
||||||
public static RcAreaModification SAMPLE_AREAMOD_GRASS = new RcAreaModification(SAMPLE_POLYAREA_TYPE_GRASS,
|
|
||||||
SAMPLE_POLYAREA_TYPE_MASK);
|
|
||||||
|
|
||||||
public static RcAreaModification SAMPLE_AREAMOD_DOOR = new RcAreaModification(SAMPLE_POLYAREA_TYPE_DOOR,
|
|
||||||
SAMPLE_POLYAREA_TYPE_DOOR);
|
|
||||||
|
|
||||||
public static RcAreaModification SAMPLE_AREAMOD_JUMP = new RcAreaModification(SAMPLE_POLYAREA_TYPE_JUMP,
|
|
||||||
SAMPLE_POLYAREA_TYPE_JUMP);
|
|
||||||
|
|
||||||
public const int SAMPLE_POLYFLAGS_WALK = 0x01; // Ability to walk (ground, grass, road)
|
public const int SAMPLE_POLYFLAGS_WALK = 0x01; // Ability to walk (ground, grass, road)
|
||||||
public const int SAMPLE_POLYFLAGS_SWIM = 0x02; // Ability to swim (water).
|
public const int SAMPLE_POLYFLAGS_SWIM = 0x02; // Ability to swim (water).
|
||||||
|
|
|
@ -30,23 +30,12 @@ public class SampleAreaModifications
|
||||||
public const int SAMPLE_POLYAREA_TYPE_GRASS = 0x5;
|
public const int SAMPLE_POLYAREA_TYPE_GRASS = 0x5;
|
||||||
public const int SAMPLE_POLYAREA_TYPE_JUMP = 0x6;
|
public const int SAMPLE_POLYAREA_TYPE_JUMP = 0x6;
|
||||||
|
|
||||||
public static RcAreaModification SAMPLE_AREAMOD_GROUND = new RcAreaModification(SAMPLE_POLYAREA_TYPE_GROUND,
|
public static readonly RcAreaModification SAMPLE_AREAMOD_GROUND = new RcAreaModification(SAMPLE_POLYAREA_TYPE_GROUND, SAMPLE_POLYAREA_TYPE_MASK);
|
||||||
SAMPLE_POLYAREA_TYPE_MASK);
|
public static readonly RcAreaModification SAMPLE_AREAMOD_WATER = new RcAreaModification(SAMPLE_POLYAREA_TYPE_WATER, SAMPLE_POLYAREA_TYPE_MASK);
|
||||||
|
public static readonly RcAreaModification SAMPLE_AREAMOD_ROAD = new RcAreaModification(SAMPLE_POLYAREA_TYPE_ROAD, SAMPLE_POLYAREA_TYPE_MASK);
|
||||||
public static RcAreaModification SAMPLE_AREAMOD_WATER = new RcAreaModification(SAMPLE_POLYAREA_TYPE_WATER,
|
public static readonly RcAreaModification SAMPLE_AREAMOD_GRASS = new RcAreaModification(SAMPLE_POLYAREA_TYPE_GRASS, SAMPLE_POLYAREA_TYPE_MASK);
|
||||||
SAMPLE_POLYAREA_TYPE_MASK);
|
public static readonly RcAreaModification SAMPLE_AREAMOD_DOOR = new RcAreaModification(SAMPLE_POLYAREA_TYPE_DOOR, SAMPLE_POLYAREA_TYPE_DOOR);
|
||||||
|
public static readonly RcAreaModification SAMPLE_AREAMOD_JUMP = new RcAreaModification(SAMPLE_POLYAREA_TYPE_JUMP, SAMPLE_POLYAREA_TYPE_JUMP);
|
||||||
public static RcAreaModification SAMPLE_AREAMOD_ROAD = new RcAreaModification(SAMPLE_POLYAREA_TYPE_ROAD,
|
|
||||||
SAMPLE_POLYAREA_TYPE_MASK);
|
|
||||||
|
|
||||||
public static RcAreaModification SAMPLE_AREAMOD_GRASS = new RcAreaModification(SAMPLE_POLYAREA_TYPE_GRASS,
|
|
||||||
SAMPLE_POLYAREA_TYPE_MASK);
|
|
||||||
|
|
||||||
public static RcAreaModification SAMPLE_AREAMOD_DOOR = new RcAreaModification(SAMPLE_POLYAREA_TYPE_DOOR,
|
|
||||||
SAMPLE_POLYAREA_TYPE_DOOR);
|
|
||||||
|
|
||||||
public static RcAreaModification SAMPLE_AREAMOD_JUMP = new RcAreaModification(SAMPLE_POLYAREA_TYPE_JUMP,
|
|
||||||
SAMPLE_POLYAREA_TYPE_JUMP);
|
|
||||||
|
|
||||||
public const int SAMPLE_POLYFLAGS_WALK = 0x01; // Ability to walk (ground, grass, road)
|
public const int SAMPLE_POLYFLAGS_WALK = 0x01; // Ability to walk (ground, grass, road)
|
||||||
public const int SAMPLE_POLYFLAGS_SWIM = 0x02; // Ability to swim (water).
|
public const int SAMPLE_POLYFLAGS_SWIM = 0x02; // Ability to swim (water).
|
||||||
|
|
Loading…
Reference in New Issue