コード例 #1
0
    private void CreateNewRing(Vector3 newPoint)
    {
        NextRing = GetInactveRing();
        NextRing.transform.position = new Vector3(newPoint.x + 10f, newPoint.y, newPoint.z);
        RingHead ringHead = NextRing.GetComponentInChildren <RingHead> (true);

        ringHead.Show();
        //RingObject ringObject = _nextRing.GetComponent<RingObject> ();
        //ringObject.ShieldVisual.Hide();

        Tweener t = NextRing.transform.DOMove(newPoint, 0.5f);

        t.SetEase(Ease.InCubic);
        t.OnComplete(() => {
            RespownBall();
            if ((DefsGame.QUEST_GOALS_Counter == 2) || ((DefsGame.QUEST_GOALS_Counter > 5) && (DefsGame.QUEST_GOALS_Counter + 2) % 5 == 0))
            {
                DefsGame.IsNeedToShowCoin = true;
                RingObject ro             = NextRing.GetComponent <RingObject>();
                DefsGame.CoinSensor.gameObject.transform.position = new Vector3(
                    ro.PointsPlace.transform.position.x,
                    ro.PointsPlace.transform.position.y + 1.5f,
                    ro.PointsPlace.transform.position.z);
                DefsGame.CoinSensor.Init(ro);
                DefsGame.CoinSensor.Show(true);
            }
        });
    }