Exemplo n.º 1
0
        private float GetForegroundSpeed()
        {
            float lowestZavailable = ParallaxManager.Instance.GetLowestZAxisValueAvailable();

            if (lowestZavailable == 0)
            {
                lowestZavailable = 1;
            }

            return(YoukaiMath.Abs((base.Transform.position.z) / lowestZavailable));
        }
Exemplo n.º 2
0
        private void CheckFrameExiting()
        {
            if (!ParallaxManager.Instance)
            {
                return;
            }

            EDirection direction = ParallaxManager.Instance.MovementDirection;

            if ((direction != EDirection.Right) && (direction != EDirection.Left))
            {
                return;
            }

            float currentDistance = GetDistanceToExitParallax(direction);

            if (YoukaiMath.Abs(currentDistance) <= _parallaxExitDistance)
            {
                RotateCopies(direction);
            }
        }
Exemplo n.º 3
0
 private void CalculateLowestZAxisValueAvailable()
 {
     _lowestZvalueAvailable = YoukaiMath.Abs(Mathf.Floor(_mainCameraTransform.position.z + 1f));
 }
Exemplo n.º 4
0
 private float GetBackgroundSpeed()
 {
     return(YoukaiMath.Abs(1f / base.Transform.position.z));
 }