コード例 #1
0
ファイル: Axis1D.cs プロジェクト: WestonChan/CIS580Project1
        public int CompareTo(object obj)
        {
            ItemPoint itemPoint = (ItemPoint)obj;

            if (this.Value < itemPoint.Value)
            {
                return(-1);
            }
            else if (this.Value == itemPoint.Value)
            {
                return(0);
            }
            else if (this.Value > itemPoint.Value)
            {
                return(1);
            }
            throw new ArgumentException();
        }
コード例 #2
0
ファイル: Axis1D.cs プロジェクト: WestonChan/CIS580Project1
 public Item(GameObject gameObject)
 {
     this.Start      = new ItemPoint(this, true, gameObject.Collider.X);
     this.End        = new ItemPoint(this, false, gameObject.Collider.X + gameObject.Collider.Width);
     this.gameObject = gameObject;
 }