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


C# Directions.Equals方法代码示例

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


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

示例1: SizeByDirect

 public int SizeByDirect(Directions direct)
 {
     if (direct.Equals(Directions.Front))
     {
         return width;
     }
     if (direct.Equals(Directions.Left))
     {
         return hight;
     }
     if (direct.Equals(Directions.Bottom))
     {
         return depth;
     }
     throw new Exception("Не должно такого быть");
 }
开发者ID:Rast1234,项目名称:2013,代码行数:16,代码来源:SHtekh_Gennadijj_Petrovich.cs

示例2: ChangeSlashEffectPosition

 void ChangeSlashEffectPosition(Directions direction)
 {
     if (direction.Equals(Directions.Left))
     {
         _playerAttackSlash.transform.localPosition = new Vector3(-renderer.bounds.size.x * 0.1f, renderer.bounds.size.y * 0.225f, 0);
     }
     else if (direction.Equals(Directions.Right))
     {
         _playerAttackSlash.transform.localPosition = new Vector3(renderer.bounds.size.x * 0.1f, renderer.bounds.size.y * 0.225f, 0);
     }
     else if (direction.Equals(Directions.Top))
     {
         _playerAttackSlash.transform.localPosition = new Vector3(renderer.bounds.size.x * 0.1f, renderer.bounds.size.y * 0.1f, 0);
     }
     else if (direction.Equals(Directions.Bottom))
     {
         _playerAttackSlash.transform.localPosition = new Vector3(-renderer.bounds.size.x * 0.1f, -renderer.bounds.size.y * 0.1f, 0);
     }
 }
开发者ID:kraftdream,项目名称:TimeKiller,代码行数:19,代码来源:HeroControll.cs

示例3: Direction2InvariantRotate

        public static Rotates Direction2InvariantRotate(Directions direct)
        {
            if (direct.Equals(Directions.Front) || direct.Equals(Directions.Back))
            {
                return Rotates.Side;
            }

            if (direct.Equals(Directions.Left) || direct.Equals(Directions.Right))
            {
                return Rotates.Forward;
            }

            if (direct.Equals(Directions.Bottom) || direct.Equals(Directions.Top))
            {
                return Rotates.Around;
            }
            return Rotates.Side;
            throw new Exception("Такого не должно случаться");
        }
开发者ID:Rast1234,项目名称:2013,代码行数:19,代码来源:SHtekh_Gennadijj_Petrovich.cs


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