Dwarrowdelf.EnvironmentExtensions.CanBeSeen C# (CSharp) 메소드

CanBeSeen() 공개 정적인 메소드

Can the given tile be seen from any adjacent tile
public static CanBeSeen ( this env, IntVector3 location ) : bool
env this
location IntVector3
리턴 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;
        }