private void UpdateItemsPositionReverse(bool is_move_right, bool is_move_left) { for (int index = 0; index < this.mItems.Count; ++index) { UnitInventoryJobIcon jobIcon1 = this.mItems[index].job_icon; UnitInventoryJobIcon jobIcon2 = this.mItems[0].job_icon; UnitInventoryJobIcon jobIcon3 = this.mItems[this.mItems.Count - 1].job_icon; if (is_move_right && this.CheckRightAreaOut(this.mItems[index])) { this.OnItemUpdate.Invoke(int.Parse(((UnityEngine.Object) this.mItems[0].gameObject).get_name()) - 1, this.mItems[index].gameObject); float num = (float)this.mItems[0].position.x - jobIcon2.HalfWidth - this.ITEM_DISTANCE - jobIcon1.HalfWidth; this.mItems[index].position = new Vector2(num, (float)this.mItems[index].position.y); JobIconScrollListController.ItemData mItem = this.mItems[index]; this.mItems.RemoveAt(index); this.mItems.Insert(0, mItem); index = -1; } else if (is_move_left && this.CheckLeftAreaOut(this.mItems[index])) { this.OnItemUpdate.Invoke(int.Parse(((UnityEngine.Object) this.mItems[this.mItems.Count - 1].gameObject).get_name()) + 1, this.mItems[index].gameObject); float num = (float)this.mItems[this.mItems.Count - 1].position.x + jobIcon3.HalfWidth + this.ITEM_DISTANCE + jobIcon1.HalfWidth; this.mItems[index].position = new Vector2(num, (float)this.mItems[index].position.y); JobIconScrollListController.ItemData mItem = this.mItems[index]; this.mItems.RemoveAt(index); this.mItems.Add(mItem); index = -1; } } }
private bool CheckLeftAreaOut(JobIconScrollListController.ItemData item) { // ISSUE: explicit reference operation return((double)((Rect)@this.mViewArea).get_x() > (((Component)this).get_transform() as RectTransform).get_anchoredPosition().x + item.position.x + (double)item.job_icon.HalfWidth); }