当前位置: 首页>>代码示例>>C#>>正文


C# EditorMap.DrawFilter方法代码示例

本文整理汇总了C#中EditorMap.DrawFilter方法的典型用法代码示例。如果您正苦于以下问题:C# EditorMap.DrawFilter方法的具体用法?C# EditorMap.DrawFilter怎么用?C# EditorMap.DrawFilter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EditorMap的用法示例。


在下文中一共展示了EditorMap.DrawFilter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: IsObjectVisible

        /// <summary>
        /// Gets if the given object is visible according to the drawing filter currently being used.
        /// Objects that are never drawn or are never filtered always return true, even if they are not actually visible.
        /// </summary>
        /// <param name="map">The current map.</param>
        /// <param name="obj">The object to check if visible.</param>
        /// <returns>True if the <paramref name="obj"/> is visible or not applicable to the map drawing filter; otherwise false.</returns>
        protected virtual bool IsObjectVisible(EditorMap map, object obj)
        {
            var drawable = obj as IDrawable;
            if (drawable == null)
                return true;

            if (map == null)
                return true;

            if (map.DrawFilter == null)
                return true;

            return map.DrawFilter(drawable);
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:21,代码来源:MapCursorToolBase.cs


注:本文中的EditorMap.DrawFilter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。