• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Side类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Side的典型用法代码示例。如果您正苦于以下问题:C# Side类的具体用法?C# Side怎么用?C# Side使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Side类属于命名空间,在下文中一共展示了Side类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ArgumentCheck

 private static void ArgumentCheck(Side side, int m, int n, int k, int ilo, int ihi, Object A, int lda, Object tau, Object C, int ldc) {
   if ( A == null ) {
     throw new ArgumentNullException("A","A cannot be null.");
   }
   if ( tau == null ) {
     throw new ArgumentNullException("tau","tau cannot be null.");
   }
   if ( C == null ) {
     throw new ArgumentNullException("C","C cannot be null.");
   }
   if ( m<0 ) {
     throw new ArgumentException("m must be at least zero.", "m");
   }
   if ( n<0 ) {
     throw new ArgumentException("n must be at least zero.", "n");
   }
   if( side == Side.Left ){
     if( k < 0 || k > m ){
       throw new ArgumentException("k must be positive and less than or equal to m.", "k");
     }
     if (m>0) {
       if (ilo<1 || ilo>m || ilo>ihi)
         throw new ArgumentException("ilo must be a positive number and less than or equal to min(ihi,m) if m>0", "ilo");
       if (ihi<1 || ihi>m)
         throw new ArgumentException("ihi must be between 1 and m if m>0", "ihi");
     } else {
       if (ilo!=1)
         throw new ArgumentException("ilo must be 1 if m=0", "ilo");
       if (ihi!=0)
         throw new ArgumentException("ihi must be 0 if m=0", "ihi");
     }
   }else{
     if( k < 0 || k > n ){
       throw new ArgumentException("k must be positive and less than or equal to n.", "k");
     }
     if (n>0) {
       if (ilo<1 || ilo>n || ilo>ihi)
         throw new ArgumentException("ilo must be a positive number and less than or equal to min(ihi,n) if n>0", "ilo");
       if (ihi<1 || ihi>n)
         throw new ArgumentException("ihi must be a positive number and less than or equal to n if n>0", "ihi");
     } else {
       if (ilo!=1)
         throw new ArgumentException("ilo must be 1 if n=0", "ilo");
       if (ihi!=0)
         throw new ArgumentException("ihi must be 0 if n=0", "ihi");
     }
   }
   if( side == Side.Left ){
     if ( lda < System.Math.Max(1,m) ) {
       throw new ArgumentException("lda must be at least max(1,m)", "lda");
     }
   }else{
     if ( lda < System.Math.Max(1,n) ) {
       throw new ArgumentException("lda must be at least max(1,n)", "lda");
     }
   }
   if ( ldc < System.Math.Max(1,m) ) {
     throw new ArgumentException("ldc must be at least max(1,m)", "ldc");
   }
 }
开发者ID:Altaxo,项目名称:Altaxo,代码行数:60,代码来源:Unmhr.cs


示例2: RotateSide

 public static Side RotateSide(Side side, int steps)
 {
     int index = Array.IndexOf(allSides, side);
     index += steps;
     index = Mathf.CeilToInt(Mathf.Repeat(index, allSides.Length));
     return allSides[index];
 }
开发者ID:Bakiet,项目名称:ZombieMatchSurvival,代码行数:7,代码来源:Utils.cs


示例3: ArgumentCheck

    ///<summary>Check arguments so that errors don't occur in native code</summary>
    private static void ArgumentCheck( Side side, int m, int n, object A, int lda, object B, int ldb ) {
      if ( A == null ) {
        throw new ArgumentNullException("A", "A cannot be null.");
      }
      if ( B == null ) {
        throw new ArgumentNullException("B", "B cannot be null.");
      }
      if ( m < 0) {
        throw new ArgumentException("m must be zero or greater", "m");
      }
      if ( n < 0) {
        throw new ArgumentException("n must be zero or greater", "n");
      }
    
      if (side == Side.Left) {
        if(lda < System.Math.Max(1,m)){
          throw new ArgumentException("lda must be at least max(1,m).", "lda");
        }
      }else{
        if(lda < System.Math.Max(1,n)){
          throw new ArgumentException("lda must be at least max(1,n).","lda");
        }
      }
      if(ldb < System.Math.Max(1,m)){
        throw new ArgumentException("lda must be at least max(1,m).","ldb");
      }

    }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:29,代码来源:Trsm.cs


示例4: Person

 public Person(int helthPoint, int x, int y, Side team)
 {
     this.HelthPoint = helthPoint;
     this.x = x;
     this.y = y;
     this.Team = team;
 }
开发者ID:donich1294,项目名称:ZombiGame,代码行数:7,代码来源:Person.cs


示例5: WaitForPosition

	private IEnumerator WaitForPosition()
	{
		yield return new WaitForEndOfFrame();

		int dir = 1;
		lastSide = Side.Right;

		Vector3 viewportPosition = Camera.main.WorldToViewportPoint (transform.position);
		if((viewportPosition.x < 0 && viewportPosition.y > 0.5f) ||
		   (viewportPosition.x > 1 && viewportPosition.y < 0.5f) ||
		   (viewportPosition.y < 0 && viewportPosition.x < 0.5f) ||
		   (viewportPosition.y > 1 && viewportPosition.x > 0.5f))
		{
			dir = -1;
			lastSide = Side.Left;
		}

		sideVelocity = (Vector2)transform.up * dir;
		frontVelocity = (Vector2)transform.right;
		finalVelocity = (frontVelocity + sideVelocity).normalized;

		myAnimator.SetInteger ("State", (lastSide == Side.Right) ? 0 : 1);

		yield return new WaitForEndOfFrame();

		myAnimator.SetInteger("State", 2);

		angle = Mathf.Atan2 (finalVelocity.y, finalVelocity.x) * Mathf.Rad2Deg;
		
		StartCoroutine (ChangeDirection (timeToChangeDirection.Random ()));
	}
开发者ID:OvertimeStudios,项目名称:CreepyBuster,代码行数:31,代码来源:ZigZag.cs


示例6: Player

 public Player(string name, Side side)
 {
     Name = name;
     Side = side;
     win = 0;
     lose = 0;
 }
开发者ID:peleccom,项目名称:chess,代码行数:7,代码来源:Player.cs


示例7: AdvanceState

        private void AdvanceState(Side side)
        {
            if (StillPlaying())
            {
                if (HasEnteredDeuce())
                {
                    this.state = GameState.Deuce;

                    if (GetPointState(side) == PointState.Advantage)
                    {
                        this.state = DetermineWinner(side);
                        return;
                    }

                    if((sideOnePoints == PointState.Deuce && sideTwoPoints == PointState.Deuce)
                        || (sideOnePoints == PointState.Forty && sideTwoPoints == PointState.Forty))
                    {
                        SetPointState(side, PointState.Advantage);
                        return;
                    }

                    sideOnePoints = PointState.Deuce;
                    sideTwoPoints = PointState.Deuce;
                    return;
                }

                RollPoints(side);

                if (((int)GetPointState(side)) > 4)
                {
                    this.state = DetermineWinner(side);
                }
            }
        }
开发者ID:dtryon,项目名称:tennis,代码行数:34,代码来源:Game.cs


示例8:

 public Slot this[Side index]
 {
     // access to neighby slots on the index
     get {
         return slot.nearSlot[index];
     }
 }
开发者ID:amisiak7,项目名称:jewels2,代码行数:7,代码来源:SlotForChip.cs


示例9: MoveWindowOutOfScreen

        private async void MoveWindowOutOfScreen(Side side)
        {
            BaseWindow.Topmost = true;
            MoveOut?.Invoke(this, EventArgs.Empty);
            if (side == Side.Left)
            {
                for (var i = 0; i > -32; i--)
                {
                    await Task.Delay(1);
                    BaseWindow.Left = i * 10 + WpfScreen.MostLeftX;
                }
            }
            else
            {
                for (int i = 0; i < 32; i++)
                {
                    await Task.Delay(1);
                    BaseWindow.Left = WpfScreen.MostRightX - BaseWindow.Width + i * 10;
                }
            }

            _movedOut = true;
            BaseWindow.ShowInTaskbar = false;
            _movedOutSide = side;
            StartMagic();
        }
开发者ID:caesay,项目名称:Hurricane,代码行数:26,代码来源:MagicArrowService.cs


示例10: getPosition

 public Position getPosition(Instrument instrument, Side orderMode)
 {
     IntPtr cPtr = ContextModulePINVOKE.NetPositions_getPosition(swigCPtr, Instrument.getCPtr(instrument), (int)orderMode);
     Position ret = (cPtr == IntPtr.Zero) ? null : new Position(cPtr, false);
     if (ContextModulePINVOKE.SWIGPendingException.Pending) throw ContextModulePINVOKE.SWIGPendingException.Retrieve();
     return ret;
 }
开发者ID:EonKid,项目名称:muTradeApi,代码行数:7,代码来源:NetPositions.cs


示例11: DbWords

 public DbWords(int CardId, Side ListSide, WordType ListType, ParentClass parentClass)
 {
     id = CardId;
     side = ListSide;
     type = ListType;
     parent = parentClass;
 }
开发者ID:hmehr,项目名称:OSS,代码行数:7,代码来源:DbWords.cs


示例12: ShowSidesInfo

 static void ShowSidesInfo(Side[] sides)
 {
     foreach (var side in sides)
     {
         Console.WriteLine(side.Length);
     }
 }
开发者ID:NikitaVas,项目名称:CSharp,代码行数:7,代码来源:Program.cs


示例13: getAveragePrice

        public bool getAveragePrice(MarketData md, int qty, Side side, int leg)
        {
            long tempPrice = 0;
            long tempQty = 0;
            for (int i = 0; i < 5; ++i)
            {
                long p = md.getPrice(side, i + 1);
                long q = md.getQty(side, i + 1);

                tempPrice += p * q;
                tempQty += q;

                if (tempQty >= qty)
                    break;
            }

            if (tempQty < qty)
            {
                if (leg == 1)
                    _data.avgPriceFirstLeg = 0;
                else
                    _data.avgPriceSecondLeg = 0;
                return false;
            }
            if (leg == 1)
                _data.avgPriceFirstLeg = (int)(tempPrice / tempQty);
            else
                _data.avgPriceSecondLeg = (int)(tempPrice / tempQty);

            return true;
        }
开发者ID:EonKid,项目名称:muTradeApi,代码行数:31,代码来源:ApplicationImpl.cs


示例14: Jugador

        /// <summary>
        /// Inicializa el Jugador a partir de su <see cref="Side"/>
        /// </summary>
        /// <param name="side"></param>
        public Jugador(Side side)
        {
            //Inicializamos las variables
            paddlePosition = new Point();
            paddlePositionPast = new Point();
            position = new Point();
            this.side = side;
            score = 0;

            //Creamos el puntero para ver donde se encuentra la mano del jugador
            mark = new Ellipse();
            mark.Width = Utilities.PLAYER_ELLIPSE_RADIUS;
            mark.Height = Utilities.PLAYER_ELLIPSE_RADIUS;

            //Creamos la barra del jugador
            shape = new Rectangle();
            shape.Width = Utilities.PADDLE_WIDTH;
            shape.Height = Utilities.PADDLE_HEIGHT; ;
            shape.Stroke = new SolidColorBrush(Colors.White);
            shape.StrokeThickness = 2;

            //Coloreamos según el jugador que sea
            switch (side) {
                case Side.Player1:
                mark.Fill = new SolidColorBrush(Utilities.PLAYER1_COLOR);
                shape.Fill = new SolidColorBrush(Utilities.PLAYER1_COLOR);
                break;
                case Side.Player2:
                mark.Fill = new SolidColorBrush(Utilities.PLAYER2_COLOR);
                shape.Fill = new SolidColorBrush(Utilities.PLAYER2_COLOR);
                break;
            }
            isConnected = false;
        }
开发者ID:Gaedr,项目名称:practica2,代码行数:38,代码来源:Jugador.cs


示例15: bt_right_Click

 private void bt_right_Click(object sender, EventArgs e)
 {
     bt_left.Enabled = false;
     bt_right.Enabled = false;
     _Side = Side.Right;
     lb_status.Text = "Press space to save right point";
 }
开发者ID:KBrizzle,项目名称:DJClicker,代码行数:7,代码来源:Main.cs


示例16: ChangeVisibility

 public void ChangeVisibility(Side side, Mode mode)
 {
     Transform sideObject = this.transform.FindChild(SidesNames [(int)side]);
     Mesh leftMesh, rightMesh, midMesh;
     switch (mode)
     {
         case Mode.Full:
             leftMesh =  fullMeshLeft;
             rightMesh = fullMeshRight;
             midMesh = fullMesh;
             break;
         case Mode.Half:
             leftMesh = halfMeshLeft;
             rightMesh = halfMeshRight;
             midMesh = halfMesh;
             break;
         case Mode.Empty:
             leftMesh = null;
             rightMesh = null;
             midMesh = emptyMesh;
             break;
         default:
             throw new ArgumentException();
     }
     sideObject.FindChild("LeftSide").GetComponent<MeshFilter>().sharedMesh= leftMesh;
     sideObject.FindChild("LeftSide").GetComponent<MeshCollider>().sharedMesh = leftMesh;
     sideObject.FindChild("RightSide").GetComponent<MeshFilter>().sharedMesh = rightMesh;
     sideObject.FindChild("RightSide").GetComponent<MeshCollider>().sharedMesh = rightMesh;
     sideObject.FindChild("Middle").GetComponent<MeshFilter>().sharedMesh = midMesh;
     sideObject.FindChild("Middle").GetComponent<MeshCollider>().sharedMesh = midMesh;
 }
开发者ID:DormantDreams,项目名称:video-game-level-scanner,代码行数:31,代码来源:MultiWallScript.cs


示例17: GetSensor

 public bool GetSensor(Axis axis, Side side)
 {
     if (axis == Axis.X)
     {
         if (side == Side.POSITIVE && GetSensorValue(axis) >= thresholdX)
             return true;
         else if (side == Side.NEGATIVE && GetSensorValue(axis) <= -thresholdX)
             return true;
         else
             return false;
     }
     else if (axis == Axis.Y)
     {
         if (side == Side.POSITIVE && GetSensorValue(axis) >= thresholdY)
             return true;
         else if (side == Side.NEGATIVE && GetSensorValue(axis) <= -thresholdY)
             return true;
         else
             return false;
     }
     else if (axis == Axis.Z)
     {
         if (side == Side.POSITIVE && GetSensorValue(axis) >= thresholdZ)
             return true;
         else if (side == Side.NEGATIVE && GetSensorValue(axis) <= thresholdZ)
             return true;
         else
             return false;
     }
     else
         return false;
 }
开发者ID:thomvandevin,项目名称:thomvandevin_pintsandpunches,代码行数:32,代码来源:MPUController.cs


示例18: TurnOption

        public Side side; // The side that it would be played on

        #endregion Fields

        #region Constructors

        public TurnOption(Dom inPlayed, Side inSide, List<Dom> inHand, List<int> inBoard)
        {
            played = inPlayed;
            side = inSide;
            hand = inHand;
            board = inBoard;
        }
开发者ID:Phrogz,项目名称:laink,代码行数:13,代码来源:IPlayer.cs


示例19: Bishop

 public Bishop(Position pos, Side side, ChessField chessfield)
     : base(pos, side, chessfield)
 {
     FigureType = FigureTypes.Bishop;
     movepolitics = new MovePolitics[] {
                                 chessfield.DiagMovePolitics};
 }
开发者ID:peleccom,项目名称:chess,代码行数:7,代码来源:Bishop.cs


示例20: Knight

 public Knight(Position pos, Side side, ChessField chessfield)
     : base(pos, side, chessfield)
 {
     FigureType = FigureTypes.Knight;
     movepolitics = new MovePolitics[] {
                                 chessfield.KnightMovePolitics};
 }
开发者ID:peleccom,项目名称:chess,代码行数:7,代码来源:Knight.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Sides类代码示例发布时间:2022-05-24
下一篇:
C# SiblingType类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap