private void SetStars() { if (!starLeftSet) { starLeftFull.SetActive(BubblesPlayer.Instance.StarCount >= 1); } if (!starMiddleSet) { starMiddleFull.SetActive(BubblesPlayer.Instance.StarCount >= 2); } if (!starRightSet) { starRightFull.SetActive(BubblesPlayer.Instance.StarCount >= 3); } ts = new TweenSeq(); if (BubblesPlayer.Instance.StarCount >= 1 && !starLeftSet) { starLeftSet = true; ts.Add((callBack) => { if (curveLeft) { float time = curveLeft.Length / speed; curveLeft.MoveAlongPath(starLeftFull.gameObject, starLeftEmpty.transform, time, 0f, EaseAnim.EaseInOutSine, callBack); } else { SimpleTween.Move(starLeftFull.gameObject, starLeftFull.transform.position, starLeftEmpty.transform.position, 0.5f).AddCompleteCallBack(() => { callBack(); }); } }); } if (BubblesPlayer.Instance.StarCount >= 2 && !starMiddleSet) { starMiddleSet = true; ts.Add((callBack) => { if (curveMiddle) { float time = curveMiddle.Length / speed; curveMiddle.MoveAlongPath(starMiddleFull.gameObject, starMiddleEmpty.transform, time, 0f, EaseAnim.EaseInOutSine, callBack); } else { SimpleTween.Move(starMiddleFull.gameObject, starMiddleFull.transform.position, starMiddleEmpty.transform.position, 0.5f).AddCompleteCallBack(() => { callBack(); }); } }); } if (BubblesPlayer.Instance.StarCount >= 3 && !starRightSet) { starRightSet = true; ts.Add((callBack) => { if (curveRight) { float time = curveRight.Length / speed; curveRight.MoveAlongPath(starRightFull.gameObject, starRightEmpty.transform, time, 0f, EaseAnim.EaseInOutSine, callBack); } else { SimpleTween.Move(starRightFull.gameObject, starRightFull.transform.position, starRightEmpty.transform.position, 0.5f).AddCompleteCallBack(() => { callBack(); }); } }); } ts.Start(); }