public void UnPinn() { PinnHeader.ShiftUp(this); UnPinnObj.PushBackItem(); if (MainMenuGlobal.getCurrentState() == MainMenuState.MS_SHORTCUT) { UserCommonData.RemoveBookmark(UnPinnObj.index); } if (EventCollider != null) { EventCollider.enabled = false; } StopCoroutine("PlayUnPin"); StopCoroutine("PlayPin"); StopCoroutine("PlayShiftUp"); StartCoroutine("PlayUnPin"); }
public override void PinnItem() { IsPinn = true; PinSR.sprite = Pin_Green; if (SubList.Length > 0) { for (int i = 0; i < SubList.Length; i++) { SubList[i].PinnItem(); } return; } if (SelfPinn == null) { return; } PinnHeader.AddItem(SelfPinn); }
IEnumerator RunPinnAnim() { if (SelfPinn == null) { yield break; } IsRunning = true; //Shift all life index ShortCutMain.ShiftUp(index); PinnHeader.AddItem(SelfPinn); //swap item to Left Side Vector3 currentPos = transform.localPosition; Vector3 targetPos = new Vector3(-8, currentPos.y, 0); while (Vector3.Distance(currentPos, targetPos) > 0.05f) { targetPos.y = currentPos.y; currentPos = Vector3.Lerp(currentPos, targetPos, Time.deltaTime * 5); transform.localPosition = currentPos; yield return(null); } transform.localPosition = targetPos; IsRunning = false; }
void Awake() { pGlobal = this; ListPosition = ShiftList.transform.localPosition; }