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


C# IPoint.Equals方法代码示例

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


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

示例1: GetForegroundColor

 private ConsoleColor GetForegroundColor(IPoint p, IPoint point, bool raw = false)
 {
     return
     !raw && (p.Equals(_map.Center) || !_map.Noise.Bounds.InBounds(point)) ? ConsoleColor.White
     : !raw && !_map.Fov[point] && _map.Seen[point] ? ConsoleColor.Gray
     : _map.Paths[point] && _map.Mountains[point] ? ConsoleColor.Gray
     : _map.Mountains[point] ? ConsoleColor.White
     : _map.Walls[point] ? ConsoleColor.DarkGray
     : (_map.SilentPaths[point] || _map.Paths[point]) && _map.Rivers[point] ? ConsoleColor.DarkRed
     : _map.Paths[point] ? ConsoleColor.DarkGreen
     : _map.Rivers[point] ? ConsoleColor.Blue
     : _map.Colors[point] < 0.75 ? ConsoleColor.Green
     : _map.Colors[point] < 0.96 ? ConsoleColor.Yellow
     : _map.Colors[point] < 0.97 ? ConsoleColor.DarkRed
     : _map.Colors[point] < 0.98 ? ConsoleColor.DarkMagenta
     : ConsoleColor.Cyan;
 }
开发者ID:nrkn,项目名称:LosvRL,代码行数:17,代码来源:Game.cs

示例2: GetForegroundColor

 private ConsoleColor GetForegroundColor( IPoint p, Point point )
 {
     return
     p.Equals( Center ) || !_noise.Bounds.InBounds( point ) ? ConsoleColor.White
     : !_fov[ point ] && _seen[ point ] ? ConsoleColor.Gray
     : _walls[ point ] ? ConsoleColor.DarkGray
     : _paths[ point ] && _rivers[ point ] ? ConsoleColor.DarkRed
     : _paths[ point ] ? ConsoleColor.DarkGreen
     : _rivers[ point ] ? ConsoleColor.Blue
     : _colors[ point ] < 0.75 ? ConsoleColor.Green
     : _colors[ point ] < 0.96 ? ConsoleColor.Yellow
     : _colors[ point ] < 0.97 ? ConsoleColor.DarkRed
     : _colors[ point ] < 0.98 ? ConsoleColor.DarkMagenta
     : ConsoleColor.Cyan;
 }
开发者ID:nrkn,项目名称:NrknLib,代码行数:15,代码来源:ConsoleViewDemo.cs


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