Пример #1
0
        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
 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;
 }