private void Start()
        {
            leftEdge   = ScreenPositionService.GetLeftEdge(Camera.main).x;
            rightEdge  = ScreenPositionService.GetRightEdge(Camera.main).x;
            topEdge    = ScreenPositionService.GetTopEdge(Camera.main).y;
            bottomEdge = ScreenPositionService.GetBottomEdge(Camera.main).y;

            SetPosition();
        }
 protected virtual void Start()
 {
     wallsManager     = GameObject.Find("WallsManager").GetComponent <WallsManager>();
     enemyController  = GetComponent <EnemyController>();
     screenTopEdge    = ScreenPositionService.GetTopEdge(Camera.main);
     screenLeftEdge   = ScreenPositionService.GetLeftEdge(Camera.main);
     screenRightEdge  = ScreenPositionService.GetRightEdge(Camera.main);
     screenBottomEdge = ScreenPositionService.GetBottomEdge(Camera.main);
 }
Пример #3
0
        private void Start()
        {
            topEdge    = ScreenPositionService.GetTopEdge(Camera.main);
            bottomEdge = ScreenPositionService.GetBottomEdge(Camera.main);

            var originalLeftEdge  = ScreenPositionService.GetLeftEdge(Camera.main);
            var originalRightEdge = ScreenPositionService.GetRightEdge(Camera.main);

            leftEdge  = new Vector3(originalLeftEdge.x + 1.5f, originalLeftEdge.y);
            rightEdge = new Vector3(originalRightEdge.x - 1.5f, originalRightEdge.y);
        }
Пример #4
0
        private void Start()
        {
            //we multiply by 2 since we want the bottom of the background to hit the screenTop
            //for such, the top of the background has to hit two the size of the screen top.
            screenTop = ScreenPositionService.GetTopEdge(Camera.main).y * 2;
            currentBackgroundContext = BackgroundContextEnum.Surface_1;
            currentBackground        = BackgroundService.GetBackground(backgroundsPool, currentBackgroundContext);
            BackgroundService.SetPropsForBackgroundContext(backgroundPropsPool, ref currentBackground);


            StartCoroutine(SlideBackground());
        }