/// <summary> /// 点击当前页面 /// </summary> private void InvokeCurrentViewButton(ToDayItem toDayItem) { if (itemAction.ContainsKey(toDayItem)) { itemAction[toDayItem].Invoke(); } }
public void Init() { AddEventTriggerListen(); countView = transform.childCount; for (int i = 0; i < countView; i++) { ToDayItem dayItem = new ToDayItem(transform.GetChild(i), Vector2.zero); item.Add(dayItem); } timeRecord_Interval = Time.time; textureWidth = item[0].trans.GetComponent <RectTransform>().rect.width; tempPosition = new Vector2(textureWidth, 0); RangeItems(); }