Beispiel #1
0
 public SecondaryLineOfSight(LineOfSightInfo info, PrimaryLineOfSight parent)
 {
     Info   = info;
     Parent = parent;
     alpha  = parent.alpha;
     X      = parent.x;
     Y      = parent.y;
 }
 public SecondaryLineOfSight(LineOfSightInfo info, PrimaryLineOfSight parent)
 {
     Info = info;
     Parent = parent;
     alpha = parent.alpha;
     X = parent.x;
     Y = parent.y;
 }
Beispiel #3
0
        public PrimaryLineOfSight(LineOfSightInfo info, int x, int y, float minRadius, float maxRadius, float strength, float preFalloff, float falloff, bool inverted, float[,] alphaMap, float[,] heightMap, List <LineOfSightInfo>[,] lineInfos)
        {
            this.info         = info;
            this.x            = x;
            this.y            = y;
            this.minRadius    = minRadius;
            this.maxRadius    = maxRadius;
            this.halfRadius   = maxRadius / 2;
            this.eighthRadius = maxRadius / 8;
            this.strength     = strength;
            this.preFalloff   = preFalloff;
            this.falloff      = falloff;
            this.inverted     = inverted;
            this.alphaMap     = alphaMap;
            this.heightMap    = heightMap;
            this.lineInfos    = lineInfos;
            this.alpha        = strength;

            width  = alphaMap.GetLength(0);
            height = alphaMap.GetLength(1);
        }
        public PrimaryLineOfSight(LineOfSightInfo info, int x, int y, float minRadius, float maxRadius, float strength, float preFalloff, float falloff, bool inverted, float[,] alphaMap, float[,] heightMap, List<LineOfSightInfo>[,] lineInfos)
        {
            this.info = info;
            this.x = x;
            this.y = y;
            this.minRadius = minRadius;
            this.maxRadius = maxRadius;
            this.halfRadius = maxRadius / 2;
            this.eighthRadius = maxRadius / 8;
            this.strength = strength;
            this.preFalloff = preFalloff;
            this.falloff = falloff;
            this.inverted = inverted;
            this.alphaMap = alphaMap;
            this.heightMap = heightMap;
            this.lineInfos = lineInfos;
            this.alpha = strength;

            width = alphaMap.GetLength(0);
            height = alphaMap.GetLength(1);
        }