Esempio n. 1
0
        IEnumerator MoveAssets(Vector3 _OffStageEndPoint, Vector3 _OnStageStartPoint)
        {
            ButtonsLocked = true;

            OffStageItem().transform.eulerAngles = new Vector3(0, DefaultRotation, 0);

            float   elapsedTime = 0;
            Vector3 startingPos = transform.position;

            while (elapsedTime < AssetTransitionTime)
            {
                OnStageItem().transform.position  = Mathfx.EasyInOut(StageCenter.position, _OffStageEndPoint, (elapsedTime / AssetTransitionTime));
                OffStageItem().transform.position = Mathfx.EasyInOut(_OnStageStartPoint, StageCenter.position, (elapsedTime / AssetTransitionTime));
                elapsedTime += Time.deltaTime;
                yield return(new WaitForEndOfFrame());
            }
            OnStageItem().transform.position    = _OffStageEndPoint;
            OnStageItem().transform.eulerAngles = new Vector3(0, DefaultRotation, 0);
            OffStageItem().transform.position   = StageCenter.position;
            RotationSlider.value = -90;

            SwitchOnScreenItem();
            SetupSkinSlider();
            SetupAnimationButtons();
            SetupAssetName();
            ButtonsLocked = false;
        }