Dwarrowdelf.EnvironmentExtensions.CanBeSeen C# (CSharp) Method

CanBeSeen() public static method

Can the given tile be seen from any adjacent tile
public static CanBeSeen ( this env, IntVector3 location ) : bool
env this
location IntVector3
return bool
        public static bool CanBeSeen(this IEnvironmentObject env, IntVector3 location)
        {
            foreach (var d in DirectionExtensions.PlanarUpDownDirections)
            {
                var p = location + d;
                if (env.Contains(p) && env.GetTileData(p).IsSeeThrough)
                    return true;
            }

            return false;
        }